From 9a9ee52f436ae3945317a177b34d640615adbc82 Mon Sep 17 00:00:00 2001 From: dosas Date: Mon, 25 Mar 2024 15:57:06 +0100 Subject: [PATCH] Use regex in user agent stubbing to cover linux-gnu that is reported for some operating systems instead of linux --- test/controllers/scc_accounts_controller_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/controllers/scc_accounts_controller_test.rb b/test/controllers/scc_accounts_controller_test.rb index 9a7ad2ab..4a37e2d6 100644 --- a/test/controllers/scc_accounts_controller_test.rb +++ b/test/controllers/scc_accounts_controller_test.rb @@ -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: {})