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
end
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 }
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)
end
......@@ -107,7 +107,7 @@ RSpec.describe API::RemoteMirrors do
it 'updates a remote mirror' do
project.add_maintainer(user)
put api(route[mirror.id], user), params: {
put api(route, user), params: {
enabled: '0',
only_protected_branches: '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