Sha256: 1b998e4221e8a1d5a67ec13870dcb5e87b287c4ab5dc06d56b8a6f6dbbabd5e8

Contents?: true

Size: 725 Bytes

Versions: 8

Compression:

Stored size: 725 Bytes

Contents

# frozen_string_literal: true
require 'test_helper'

class CarrierServiceTest < Test::Unit::TestCase
  test 'new should create carrier service' do
    fake("carrier_services", method: :post, body: load_fixture('carrier_service'))
    carrier_service = ShopifyAPI::CarrierService.new(name: "Some Postal Service")
    carrier_service.save
    assert_equal("Some Postal Service", carrier_service.name)
  end

  test 'find should return the carrier service' do
    fake("carrier_services/123456", method: :get, body: load_fixture('carrier_service'))
    carrier_service = ShopifyAPI::CarrierService.find(123456)
    assert_equal(123456, carrier_service.id)
    assert_equal("Some Postal Service", carrier_service.name)
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
ruby_shopify_api-1.2.0 test/carrier_service_test.rb
ruby_shopify_api-1.1.0 test/carrier_service_test.rb
ruby_shopify_api-1.0.0 test/carrier_service_test.rb
shopify_api-9.5.1 test/carrier_service_test.rb
shopify_api-9.5 test/carrier_service_test.rb
shopify_api-9.4.1 test/carrier_service_test.rb
shopify_api-9.4.0 test/carrier_service_test.rb
shopify_api-9.3.0 test/carrier_service_test.rb