6
7
8
9
10
11
12
13
|
# File 'lib/shopify_app/test_helpers/shopify_session_helper.rb', line 6
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
|