From e7470aa9aeb5d5f07123dbffb259be07065f03e4 Mon Sep 17 00:00:00 2001 From: Daniel Colson Date: Wed, 5 Jun 2024 11:44:03 -0400 Subject: [PATCH] Fix tests for Faraday 1.0 The adapter is now stored separately (it's been that way for some time, but we're newly using the new mechanism after upgrading). Before: ``` ``` After: ``` ``` So this commit updates these tests to check that we're using the right adapter instead of checking that the adapter is in the list of handlers. --- test/client_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/client_test.rb b/test/client_test.rb index e1ca5577..30c87fcb 100644 --- a/test/client_test.rb +++ b/test/client_test.rb @@ -9,7 +9,7 @@ it "uses the adapter specified at creation" do c = ElastomerClient::Client.new(adapter: :test) - assert_includes c.connection.builder.handlers, Faraday::Adapter::Test + assert_equal c.connection.builder.adapter, Faraday::Adapter::Test end it "allows configuring the Faraday when a block is given" do @@ -28,7 +28,7 @@ c = ElastomerClient::Client.new adapter = Faraday::Adapter.lookup_middleware(Faraday.default_adapter) - assert_includes c.connection.builder.handlers, adapter + assert_equal c.connection.builder.adapter, adapter end it "uses the same connection for all requests" do