Sha256: 197819d7c2cbb197849d93f937729824836ce674a426c725a2ffea5e5d5859cd

Contents?: true

Size: 774 Bytes

Versions: 21

Compression:

Stored size: 774 Bytes

Contents

require 'test_helper'

class Gecko::Record::FulfillmentAdapterTest < Minitest::Test
  include TestingAdapter
  include SharedAdapterExamples

  let(:adapter)       { @client.Fulfillment }
  let(:plural_name)   { 'fulfillments' }
  let(:record_class)  { Gecko::Record::Fulfillment }

  def test_initializes_adapter
    assert_instance_of(Gecko::Record::FulfillmentAdapter, @client.Fulfillment)
  end

  def test_identity_map_stores_sideloaded_line_items
    VCR.use_cassette('fulfillments') do
      collection = @client.Fulfillment.where(limit: 5)
      fulfillment = collection.first
      item = fulfillment.fulfillment_line_items.first
      assert_instance_of(Gecko::Record::FulfillmentLineItem, item)
      assert_equal(fulfillment, item.fulfillment)
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
gecko-ruby-0.9.1 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.9.0 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.8.0 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.2.6 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.7.1 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.7.0 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.6.0 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.5.0 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.2.5 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.2.4 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.2.3 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.2.2 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.2.0 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.1.0 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.0.10 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.0.9 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.0.8 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.0.7 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.0.6 test/record/fulfillment_adapter_test.rb
gecko-ruby-0.0.5 test/record/fulfillment_adapter_test.rb