summaryrefslogtreecommitdiff
path: root/spec/features/security
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-02-03 10:22:19 -0600
committerJose Ivan Vargas <jvargas@gitlab.com>2017-03-06 09:47:44 -0600
commitc4f09f23c7228341d97c45e44612a513c70c5ed9 (patch)
treef4551c9e51d18161046a37c9d22b5fb19b7534be /spec/features/security
parent5967c17e80ec0e17a2bdc615e18d1cb0a668f68f (diff)
downloadgitlab-ce-c4f09f23c7228341d97c45e44612a513c70c5ed9.tar.gz
Add access spec tests for the /settings/repository route
Diffstat (limited to 'spec/features/security')
-rw-r--r--spec/features/security/project/private_access_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/features/security/project/private_access_spec.rb b/spec/features/security/project/private_access_spec.rb
index c511dcfa18e..ad3bd60a313 100644
--- a/spec/features/security/project/private_access_spec.rb
+++ b/spec/features/security/project/private_access_spec.rb
@@ -110,6 +110,20 @@ describe "Private Project Access", feature: true do
it { is_expected.to be_denied_for(:external) }
end
+ describe "GET /:project_path/settings/repository" do
+ subject { namespace_project_settings_repository_path(project.namespace, project) }
+
+ it { is_expected.to be_allowed_for(:admin) }
+ it { is_expected.to be_allowed_for(:owner).of(project) }
+ it { is_expected.to be_allowed_for(:master).of(project) }
+ it { is_expected.to be_denied_for(:developer).of(project) }
+ it { is_expected.to be_denied_for(:reporter).of(project) }
+ it { is_expected.to be_denied_for(:guest).of(project) }
+ it { is_expected.to be_denied_for(:user) }
+ it { is_expected.to be_denied_for(:external) }
+ it { is_expected.to be_denied_for(:visitor) }
+ end
+
describe "GET /:project_path/blob" do
let(:commit) { project.repository.commit }
subject { namespace_project_blob_path(project.namespace, project, File.join(commit.id, '.gitignore'))}