Commit dacf2225 authored by Sean McGivern's avatar Sean McGivern

Fit GitAccess specs

These specs never ran due to incorrect indentation: the `context` blocks
were inside the `before`.
parent cccedcff
......@@ -215,7 +215,9 @@ describe Gitlab::GitAccess, lib: true do
def stub_git_hooks
# Running the `pre-receive` hook is expensive, and not necessary for this test.
allow_any_instance_of(GitHooksService).to receive(:execute).and_yield(GitHooksService.new)
allow_any_instance_of(GitHooksService).to receive(:execute) do |service, &block|
block.call(service)
end
end
def merge_into_protected_branch
......@@ -242,6 +244,7 @@ describe Gitlab::GitAccess, lib: true do
else
project.team << [user, role]
end
end
permissions_matrix[role].each do |action, allowed|
context action do
......@@ -259,7 +262,6 @@ describe Gitlab::GitAccess, lib: true do
end
end
end
end
# Run permission checks for a group
def self.run_group_permission_checks(permissions_matrix)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment