Sha256: fcf9362470360d5b7d3e9a9f36be2d621f1290272eb9eb4ada5d027b0f20d4ae

Contents?: true

Size: 681 Bytes

Versions: 30

Compression:

Stored size: 681 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

class ShippingRateTest < Test::Unit::TestCase
  test ":get lists all shipping rates for a given checkout" do
    fake 'checkouts', method: :get, status: 200, body: load_fixture('checkouts')
    checkouts = ShopifyAPI::Checkout.all

    fake "checkouts/#{checkouts.first.id}/shipping_rates",
      method: :get, status: 200, body: load_fixture('checkouts')
    shipping_rates = ShopifyAPI::ShippingRate.find(:all, params: { checkout_id: checkouts.first.id })

    assert_equal 2, shipping_rates.first.shipping_rates.length
    assert_equal 'canada_post-INT.TP.BOGUS-4.00', shipping_rates.first.shipping_rates.first.id
  end
end

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
shopify_api-9.5.2 test/shipping_rate_test.rb
ruby_shopify_api-1.2.0 test/shipping_rate_test.rb
ruby_shopify_api-1.1.0 test/shipping_rate_test.rb
ruby_shopify_api-1.0.0 test/shipping_rate_test.rb
shopify_api-9.5.1 test/shipping_rate_test.rb
shopify_api-9.5 test/shipping_rate_test.rb
shopify_api-9.4.1 test/shipping_rate_test.rb
shopify_api-9.4.0 test/shipping_rate_test.rb
shopify_api-9.3.0 test/shipping_rate_test.rb
shopify_api-9.2.0 test/shipping_rate_test.rb
shopify_api-9.1.0 test/shipping_rate_test.rb
shopify_api-9.0.4 test/shipping_rate_test.rb
shopify_api-9.0.3 test/shipping_rate_test.rb
shopify_api-9.0.2 test/shipping_rate_test.rb
shopify_api-9.0.1 test/shipping_rate_test.rb
shopify_api-9.0.0 test/shipping_rate_test.rb
shopify_api-8.1.0 test/shipping_rate_test.rb
shopify_api-8.0.0 test/shipping_rate_test.rb
shopify_api-7.1.0 test/shipping_rate_test.rb
shopify_api-7.0.2 test/shipping_rate_test.rb