Commit 67ca0604 authored by Timo Furrer's avatar Timo Furrer

Refactor unnecessary lambda in specs

parent fe5a94c2
...@@ -95,11 +95,11 @@ RSpec.describe API::RemoteMirrors do ...@@ -95,11 +95,11 @@ RSpec.describe API::RemoteMirrors do
end end
describe 'PUT /projects/:id/remote_mirrors/:mirror_id' do describe 'PUT /projects/:id/remote_mirrors/:mirror_id' do
let(:route) { ->(id) { "/projects/#{project.id}/remote_mirrors/#{id}" } } let(:route) { "/projects/#{project.id}/remote_mirrors/#{mirror.id}" }
let(:mirror) { project.remote_mirrors.first } let(:mirror) { project.remote_mirrors.first }
it 'requires `admin_remote_mirror` permission' do it 'requires `admin_remote_mirror` permission' do
put api(route[mirror.id], developer) put api(route, developer)
expect(response).to have_gitlab_http_status(:unauthorized) expect(response).to have_gitlab_http_status(:unauthorized)
end end
...@@ -107,7 +107,7 @@ RSpec.describe API::RemoteMirrors do ...@@ -107,7 +107,7 @@ RSpec.describe API::RemoteMirrors do
it 'updates a remote mirror' do it 'updates a remote mirror' do
project.add_maintainer(user) project.add_maintainer(user)
put api(route[mirror.id], user), params: { put api(route, user), params: {
enabled: '0', enabled: '0',
only_protected_branches: 'true', only_protected_branches: 'true',
keep_divergent_refs: 'true' keep_divergent_refs: 'true'
......
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