Sha256: e4e0db5232e52d37559d0046157f44403fb86e67f59805185e73081c6abe61ab

Contents?: true

Size: 514 Bytes

Versions: 16

Compression:

Stored size: 514 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::Context.activate_session(session)
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
shopify_app-22.3.1 lib/shopify_app/test_helpers/shopify_session_helper.rb
shopify_app-22.3.0 lib/shopify_app/test_helpers/shopify_session_helper.rb
shopify_app-22.2.1 lib/shopify_app/test_helpers/shopify_session_helper.rb
shopify_app-22.2.0 lib/shopify_app/test_helpers/shopify_session_helper.rb
shopify_app-22.1.0 lib/shopify_app/test_helpers/shopify_session_helper.rb
shopify_app-22.0.1 lib/shopify_app/test_helpers/shopify_session_helper.rb
shopify_app-22.00.0 lib/shopify_app/test_helpers/shopify_session_helper.rb
shopify_app-21.10.0 lib/shopify_app/test_helpers/shopify_session_helper.rb
shopify_app-21.9.0 lib/shopify_app/test_helpers/shopify_session_helper.rb
shopify_app-21.8.1 lib/shopify_app/test_helpers/shopify_session_helper.rb
shopify_app-21.8.0 lib/shopify_app/test_helpers/shopify_session_helper.rb
shopify_app-21.7.0 lib/shopify_app/test_helpers/shopify_session_helper.rb
shopify_app-21.6.0 lib/shopify_app/test_helpers/shopify_session_helper.rb
shopify_app-21.5.0 lib/shopify_app/test_helpers/shopify_session_helper.rb
shopify_app-21.4.1 lib/shopify_app/test_helpers/shopify_session_helper.rb
shopify_app-21.4.0 lib/shopify_app/test_helpers/shopify_session_helper.rb