Sha256: cf11f3f7f38034f9e8580fb03a0e6a80443733a5cd1a3841e5171e4b434b9938
Contents?: true
Size: 617 Bytes
Versions: 2
Compression:
Stored size: 617 Bytes
Contents
# frozen_string_literal: true module ShopifyApp module TestHelpers module ShopifySessionHelper 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 end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shopify_app-22.5.0 | lib/shopify_app/test_helpers/shopify_session_helper.rb |
shopify_app-22.4.0 | lib/shopify_app/test_helpers/shopify_session_helper.rb |