Skip to content

Commit

Permalink
Fix rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
NARKOZ committed Dec 26, 2021
1 parent 25f6f76 commit 6f4e4df
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions spec/gitlab/request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

0 comments on commit 6f4e4df

Please sign in to comment.