From 5448d55ba581a669da6b2dd763e2fa15ba57632b Mon Sep 17 00:00:00 2001 From: Zoey Lan Date: Wed, 27 Mar 2024 11:32:55 -0600 Subject: [PATCH] Replace expects with stubs --- .../controller_concerns/token_exchange_test.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/shopify_app/controller_concerns/token_exchange_test.rb b/test/shopify_app/controller_concerns/token_exchange_test.rb index 484dff528..a02414c77 100644 --- a/test/shopify_app/controller_concerns/token_exchange_test.rb +++ b/test/shopify_app/controller_concerns/token_exchange_test.rb @@ -52,7 +52,7 @@ class TokenExchangeControllerTest < ActionController::TestCase test "Exchanges offline token when session doesn't exist" do with_application_test_routes do - ShopifyAPI::Utils::SessionUtils.expects(:current_session_id).twice.with( + ShopifyAPI::Utils::SessionUtils.stubs(:current_session_id).with( @session_token_in_header, nil, false, @@ -74,7 +74,7 @@ class TokenExchangeControllerTest < ActionController::TestCase ShopifyApp::SessionRepository.user_storage = ShopifyApp::InMemoryUserSessionStore with_application_test_routes do - ShopifyAPI::Utils::SessionUtils.expects(:current_session_id).twice.with( + ShopifyAPI::Utils::SessionUtils.stubs(:current_session_id).with( @session_token_in_header, nil, true, @@ -102,7 +102,7 @@ class TokenExchangeControllerTest < ActionController::TestCase ShopifyApp::SessionRepository.store_shop_session(@offline_session) with_application_test_routes do - ShopifyAPI::Utils::SessionUtils.expects(:current_session_id).with( + ShopifyAPI::Utils::SessionUtils.stubs(:current_session_id).with( @session_token_in_header, nil, false, @@ -121,7 +121,7 @@ class TokenExchangeControllerTest < ActionController::TestCase ShopifyApp::SessionRepository.store_user_session(@online_session, @user) with_application_test_routes do - ShopifyAPI::Utils::SessionUtils.expects(:current_session_id).with( + ShopifyAPI::Utils::SessionUtils.stubs(:current_session_id).with( @session_token_in_header, nil, true, @@ -142,7 +142,7 @@ class TokenExchangeControllerTest < ActionController::TestCase @online_session.stubs(:expired?).returns(true) with_application_test_routes do - ShopifyAPI::Utils::SessionUtils.expects(:current_session_id).twice.with( + ShopifyAPI::Utils::SessionUtils.stubs(:current_session_id).with( @session_token_in_header, nil, true, @@ -176,7 +176,7 @@ class TokenExchangeControllerTest < ActionController::TestCase @online_session.stubs(:expired?).returns(false) with_application_test_routes do - ShopifyAPI::Utils::SessionUtils.expects(:current_session_id).with( + ShopifyAPI::Utils::SessionUtils.stubs(:current_session_id).with( @session_token_in_header, nil, true,