Commit e55e224c authored by Jacob Vosmaer's avatar Jacob Vosmaer

Fix ArgumentError in GitAccess specs

parent b8f754dd
...@@ -19,11 +19,11 @@ describe Gitlab::GitAccess, lib: true do ...@@ -19,11 +19,11 @@ describe Gitlab::GitAccess, lib: true do
end end
it 'blocks ssh git push' do it 'blocks ssh git push' do
expect(@acc.check('git-receive-pack').allowed?).to be_falsey expect(@acc.check('git-receive-pack', '_any').allowed?).to be_falsey
end end
it 'blocks ssh git pull' do it 'blocks ssh git pull' do
expect(@acc.check('git-upload-pack').allowed?).to be_falsey expect(@acc.check('git-upload-pack', '_any').allowed?).to be_falsey
end end
end end
...@@ -34,17 +34,17 @@ describe Gitlab::GitAccess, lib: true do ...@@ -34,17 +34,17 @@ describe Gitlab::GitAccess, lib: true do
end end
it 'blocks http push' do it 'blocks http push' do
expect(@acc.check('git-receive-pack').allowed?).to be_falsey expect(@acc.check('git-receive-pack', '_any').allowed?).to be_falsey
end end
it 'blocks http git pull' do it 'blocks http git pull' do
expect(@acc.check('git-upload-pack').allowed?).to be_falsey expect(@acc.check('git-upload-pack', '_any').allowed?).to be_falsey
end end
end end
end end
describe 'download_access_check' do describe 'download_access_check' do
subject { access.check('git-upload-pack') } subject { access.check('git-upload-pack', '_any') }
describe 'master permissions' do describe 'master permissions' do
before { project.team << [user, :master] } before { project.team << [user, :master] }
...@@ -288,7 +288,7 @@ describe Gitlab::GitAccess, lib: true do ...@@ -288,7 +288,7 @@ describe Gitlab::GitAccess, lib: true do
let(:actor) { key } let(:actor) { key }
context 'push code' do context 'push code' do
subject { access.check('git-receive-pack') } subject { access.check('git-receive-pack', '_any') }
context 'when project is authorized' do context 'when project is authorized' do
before { key.projects << project } before { key.projects << project }
......
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