diff options
author | Sean McGivern <sean@gitlab.com> | 2016-10-18 17:28:57 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-10-18 17:28:57 +0100 |
commit | cc6d42861bed8fc4c050ee8906d77bdb49783de5 (patch) | |
tree | 1ff206f64f5d223075c38d3e743e19925b1adea1 | |
parent | c9d7ba4d696bfd0198ac75db6e1b2a08b4517f82 (diff) | |
download | gitlab-ce-cc6d42861bed8fc4c050ee8906d77bdb49783de5.tar.gz |
Backport git access spec changes from EEbackport-git-access-spec-changes
These were introduced in:
<https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/645>
-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 |