2019-09-04 21:01:54 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2014-09-02 18:07:02 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2019-03-02 22:35:43 +05:30
|
|
|
describe "Profile access" do
|
2015-09-11 14:41:01 +05:30
|
|
|
include AccessMatchers
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
describe "GET /profile/keys" do
|
|
|
|
subject { profile_keys_path }
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
it { is_expected.to be_allowed_for :admin }
|
|
|
|
it { is_expected.to be_allowed_for :user }
|
|
|
|
it { is_expected.to be_denied_for :visitor }
|
|
|
|
end
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
describe "GET /profile" do
|
|
|
|
subject { profile_path }
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
it { is_expected.to be_allowed_for :admin }
|
|
|
|
it { is_expected.to be_allowed_for :user }
|
|
|
|
it { is_expected.to be_denied_for :visitor }
|
|
|
|
end
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
describe "GET /profile/account" do
|
|
|
|
subject { profile_account_path }
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
it { is_expected.to be_allowed_for :admin }
|
|
|
|
it { is_expected.to be_allowed_for :user }
|
|
|
|
it { is_expected.to be_denied_for :visitor }
|
|
|
|
end
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-09-11 14:41:01 +05:30
|
|
|
describe "GET /profile/preferences" do
|
|
|
|
subject { profile_preferences_path }
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
it { is_expected.to be_allowed_for :admin }
|
|
|
|
it { is_expected.to be_allowed_for :user }
|
|
|
|
it { is_expected.to be_denied_for :visitor }
|
|
|
|
end
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-09-11 14:41:01 +05:30
|
|
|
describe "GET /profile/audit_log" do
|
|
|
|
subject { audit_log_profile_path }
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
it { is_expected.to be_allowed_for :admin }
|
|
|
|
it { is_expected.to be_allowed_for :user }
|
|
|
|
it { is_expected.to be_denied_for :visitor }
|
|
|
|
end
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
describe "GET /profile/notifications" do
|
|
|
|
subject { profile_notifications_path }
|
2014-09-02 18:07:02 +05:30
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
it { is_expected.to be_allowed_for :admin }
|
|
|
|
it { is_expected.to be_allowed_for :user }
|
|
|
|
it { is_expected.to be_denied_for :visitor }
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|
|
|
|
end
|