Sha256: 05357968c87977c1e4336d89ed539974880e4abf4dccfa33620e0670edb28763

Contents?: true

Size: 525 Bytes

Versions: 42

Compression:

Stored size: 525 Bytes

Contents

module DiscoApp::Test
  module ShopifyAPI

    def stub_api_request(method, endpoint, fixture_name)
      if method == :get
        stub_request(method, endpoint)
          .to_return(status: 200, body: api_fixture("#{fixture_name}_response").to_json)
      elsif method == :post or method == :put
        stub_request(method, endpoint)
          .with(body: api_fixture("#{fixture_name}_request").to_json)
          .to_return(status: 201, body: api_fixture("#{fixture_name}_response").to_json)
      end
    end

  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
disco_app-0.16.1.pre.sidekiq.pre.6.pre.release test/support/test_shopify_api.rb
disco_app-0.9.4 test/support/test_shopify_api.rb
disco_app-0.9.5 test/support/test_shopify_api.rb
disco_app-0.9.6 test/support/test_shopify_api.rb
disco_app-0.9.7 test/support/test_shopify_api.rb
disco_app-0.9.8 test/support/test_shopify_api.rb
disco_app-0.9.9 test/support/test_shopify_api.rb
disco_app-0.9.10 test/support/test_shopify_api.rb
disco_app-0.9.11 test/support/test_shopify_api.rb
disco_app-0.10.0 test/support/test_shopify_api.rb
disco_app-0.10.1 test/support/test_shopify_api.rb
disco_app-0.10.2 test/support/test_shopify_api.rb
disco_app-0.10.3 test/support/test_shopify_api.rb
disco_app-0.10.4 test/support/test_shopify_api.rb
disco_app-0.10.5 test/support/test_shopify_api.rb
disco_app-0.11.0 test/support/test_shopify_api.rb
disco_app-0.11.1 test/support/test_shopify_api.rb
disco_app-0.12.0 test/support/test_shopify_api.rb
disco_app-0.12.1 test/support/test_shopify_api.rb
disco_app-0.12.5 test/support/test_shopify_api.rb