diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-10-19 09:37:58 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-10-20 17:05:58 +0200 |
commit | f0f78bb0b336084e879c1440e9de5ae3de75c19b (patch) | |
tree | 3883a02445966165294b8d42a151ecf317170eb4 | |
parent | 1a2ca1686fbf03c6f14efe24e3316aeea8d03b10 (diff) | |
download | gitlab-ce-f0f78bb0b336084e879c1440e9de5ae3de75c19b.tar.gz |
Merge branch 'backport-git-access-spec-changes' into 'master'
Backport git access spec changes from EE
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/645#note_16391185
See merge request !6961
-rw-r--r-- | spec/lib/gitlab/git_access_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/lib/gitlab/git_access_spec.rb b/spec/lib/gitlab/git_access_spec.rb index de68e32e5b4..a5aa387f4f7 100644 --- a/spec/lib/gitlab/git_access_spec.rb +++ b/spec/lib/gitlab/git_access_spec.rb @@ -185,6 +185,7 @@ describe Gitlab::GitAccess, lib: true do end end + # Run permission checks for a user def self.run_permission_checks(permissions_matrix) permissions_matrix.keys.each do |role| describe "#{role} access" do @@ -194,13 +195,12 @@ describe Gitlab::GitAccess, lib: true do else project.team << [user, role] end - end - - permissions_matrix[role].each do |action, allowed| - context action do - subject { access.push_access_check(changes[action]) } - it { expect(subject.allowed?).to allowed ? be_truthy : be_falsey } + permissions_matrix[role].each do |action, allowed| + context action do + subject { access.push_access_check(changes[action]) } + it { expect(subject.allowed?).to allowed ? be_truthy : be_falsey } + end end end end |