diff --git a/spec/gitlab/request_spec.rb b/spec/gitlab/request_spec.rb index 8f6681e83..ad5c302ff 100644 --- a/spec/gitlab/request_spec.rb +++ b/spec/gitlab/request_spec.rb @@ -232,7 +232,7 @@ .with(body: body) .to_return( status: [301, 'Moved Permanently'], - headers: { location: https_path }, + headers: { location: https_path } ) stub_request(:put, https_path) .with(body: body) @@ -242,18 +242,24 @@ ) # simulate Gitlab.edit_application_settings(signup_enabled: true) - @request.put('/application/settings', :body => body) - - expect(a_request(:put, http_path).with( - body: body, - headers: { - 'PRIVATE_TOKEN' => token - }.merge(described_class.headers))).to have_been_made - expect(a_request(:put, https_path).with( - body: body, - headers: { - 'PRIVATE_TOKEN' => token - }.merge(described_class.headers))).to have_been_made + @request.put('/application/settings', body: body) + + expect( + a_request(:put, http_path).with( + body: body, + headers: { + 'PRIVATE_TOKEN' => token + }.merge(described_class.headers) + ) + ).to have_been_made + expect( + a_request(:put, https_path).with( + body: body, + headers: { + 'PRIVATE_TOKEN' => token + }.merge(described_class.headers) + ) + ).to have_been_made end end end