diff --git a/CHANGELOG.md b/CHANGELOG.md index 75e231f68..cbe6b2838 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Unreleased ---------- * Add the `unified_admin_domain` configuration option for the unified admin domain. - Add new generators for webhook subscriptions defined in the `shopify.app.toml` file [1882](https://github.com/Shopify/shopify_app/pull/1882) +- Fix test stubbing for Token Exchange auth 22.3.1 (July 26, 2024) ---------- diff --git a/lib/shopify_app/test_helpers/shopify_session_helper.rb b/lib/shopify_app/test_helpers/shopify_session_helper.rb index cec316f41..7554cb289 100644 --- a/lib/shopify_app/test_helpers/shopify_session_helper.rb +++ b/lib/shopify_app/test_helpers/shopify_session_helper.rb @@ -7,6 +7,7 @@ def setup_shopify_session(session_id:, shop_domain:) ShopifyAPI::Auth::Session.new(id: session_id, shop: shop_domain).tap do |session| ShopifyApp::SessionRepository.stubs(:load_session).returns(session) ShopifyAPI::Utils::SessionUtils.stubs(:current_session_id).returns(session.id) + ShopifyAPI::Utils::SessionUtils.stubs(:session_id_from_shopify_id_token).returns(session.id) ShopifyAPI::Context.activate_session(session) end end