Skip to content

Commit

Permalink
maybe fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Nov 30, 2023
1 parent 9da7ed6 commit 14f5baa
Showing 1 changed file with 22 additions and 23 deletions.
45 changes: 22 additions & 23 deletions spec/unleash/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -299,16 +299,16 @@

it "should not fail if we are provided no variants from the unleash server" do
WebMock.stub_request(:post, "http://test-url/client/register")
.with(
headers: {
'Accept' => '*/*',
'Content-Type' => 'application/json',
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
'User-Agent' => 'Ruby',
'X-Api-Key' => '123'
}
)
.to_return(status: 200, body: "", headers: {})
.with(
headers: {
'Accept' => '*/*',
'Content-Type' => 'application/json',
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
'User-Agent' => 'Ruby',
'X-Api-Key' => '123'
}
)
.to_return(status: 200, body: "", headers: {})

features_response_body = '{
"version": 1,
Expand All @@ -321,18 +321,18 @@
}'

WebMock.stub_request(:get, "http://test-url/client/features")
.with(
headers: {
'Accept' => '*/*',
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
'Content-Type' => 'application/json',
'Unleash-Appname' => 'my-test-app',
'Unleash-Instanceid' => 'rspec/test',
'User-Agent' => 'Ruby',
'X-Api-Key' => '123'
}
)
.to_return(status: 200, body: features_response_body, headers: {})
.with(
headers: {
'Accept' => '*/*',
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
'Content-Type' => 'application/json',
'Unleash-Appname' => 'my-test-app',
'Unleash-Instanceid' => 'rspec/test',
'User-Agent' => 'Ruby',
'X-Api-Key' => '123'
}
)
.to_return(status: 200, body: features_response_body, headers: {})

Unleash.configure do |config|
config.url = 'http://test-url/'
Expand All @@ -353,7 +353,6 @@
expect(WebMock).not_to have_requested(:post, 'http://test-url/client/metrics')
end


it "should forcefully disable metrics if the client is disabled" do
Unleash.configure do |config|
config.url = 'http://test-url/'
Expand Down

0 comments on commit 14f5baa

Please sign in to comment.