Skip to content

Commit

Permalink
Use regex in user agent stubbing
Browse files Browse the repository at this point in the history
to cover linux-gnu that is reported for some
operating systems instead of linux
  • Loading branch information
dosas authored and sbernhard committed Mar 26, 2024
1 parent 62efb06 commit 9a9ee52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/controllers/scc_accounts_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def stub_custom_request(url, host = 'scc.example.com', auth = 'Basic b25ldXNlcjp
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
'Authorization' => auth,
'Host' => host,
'User-Agent' => "rest-client/2.1.0 (linux x86_64) ruby/#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}",
'User-Agent' => /rest-client\/2.1.0 \(linux(-gnu)? x86_64\) ruby\/#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}/,
}
)
.to_return(status: 200, body: '', headers: {})
Expand Down

0 comments on commit 9a9ee52

Please sign in to comment.