Skip to content

Commit

Permalink
Fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
ylecuyer committed Dec 28, 2024
1 parent 1b2f57a commit 1cf751c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/cases/http_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,17 +238,17 @@ def adapter(arg)
it 'logs tokens' do
allow(Koala.config).to receive(:mask_tokens) { false }

expect(Koala::Utils).to receive(:debug).with('STARTED => GET: /foo params: {"an"=>:arg, "access_token"=>"myvisbleaccesstoken"}')
expect(Koala::Utils).to receive(:debug).with('FINISHED => GET: /foo params: {"an"=>:arg, "access_token"=>"myvisbleaccesstoken"}')
expect(Koala::Utils).to receive(:debug).with('STARTED => GET: /foo params: {"an" => :arg, "access_token" => "myvisbleaccesstoken"}')
expect(Koala::Utils).to receive(:debug).with('FINISHED => GET: /foo params: {"an" => :arg, "access_token" => "myvisbleaccesstoken"}')

Koala::HTTPService.make_request(request)
end

it 'doesnt log tokens' do
allow(Koala.config).to receive(:mask_tokens) { true }

expect(Koala::Utils).to receive(:debug).with('STARTED => GET: /foo params: {"an"=>:arg, "access_token"=>"myvisbleac*****token"}')
expect(Koala::Utils).to receive(:debug).with('FINISHED => GET: /foo params: {"an"=>:arg, "access_token"=>"myvisbleac*****token"}')
expect(Koala::Utils).to receive(:debug).with('STARTED => GET: /foo params: {"an" => :arg, "access_token" => "myvisbleac*****token"}')
expect(Koala::Utils).to receive(:debug).with('FINISHED => GET: /foo params: {"an" => :arg, "access_token" => "myvisbleac*****token"}')

Koala::HTTPService.make_request(request)
end
Expand All @@ -258,8 +258,8 @@ def adapter(arg)

allow(Koala.config).to receive(:mask_tokens) { true }

expect(Koala::Utils).to receive(:debug).with('STARTED => GET: /debug_token params: {"input_token"=>"myvisiblea*****token", "access_token"=>"myvisiblea*****token"}')
expect(Koala::Utils).to receive(:debug).with('FINISHED => GET: /debug_token params: {"input_token"=>"myvisiblea*****token", "access_token"=>"myvisiblea*****token"}')
expect(Koala::Utils).to receive(:debug).with('STARTED => GET: /debug_token params: {"input_token" => "myvisiblea*****token", "access_token" => "myvisiblea*****token"}')
expect(Koala::Utils).to receive(:debug).with('FINISHED => GET: /debug_token params: {"input_token" => "myvisiblea*****token", "access_token" => "myvisiblea*****token"}')

Koala::HTTPService.make_request(request)
end
Expand Down

0 comments on commit 1cf751c

Please sign in to comment.