Sha256: 8da9f0166dee756fac8ff347eedd7291b527360acbfcae74e3e42e74677dbb90

Contents?: true

Size: 565 Bytes

Versions: 7

Compression:

Stored size: 565 Bytes

Contents

module SharedSideloadedDataParsingExamples
  def test_adapter_sideloaded_data_parsing
    VCR.use_cassette(plural_name + '_sideloaded') do

      collection = adapter.where(limit: 5, _include: children.join(","))

      children.each do |child|
        child_adapter = @client.adapter_for(child.singularize.classify)

        identity_map = child_adapter.instance_variable_get(:@identity_map)
        child_collection = collection.flat_map { |record| record.send(child).to_a }

        assert_equal child_collection, identity_map.values
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gecko-ruby-0.9.1 test/support/shared_sideloaded_data_parsing_examples.rb
gecko-ruby-0.9.0 test/support/shared_sideloaded_data_parsing_examples.rb
gecko-ruby-0.8.0 test/support/shared_sideloaded_data_parsing_examples.rb
gecko-ruby-0.7.1 test/support/shared_sideloaded_data_parsing_examples.rb
gecko-ruby-0.7.0 test/support/shared_sideloaded_data_parsing_examples.rb
gecko-ruby-0.6.0 test/support/shared_sideloaded_data_parsing_examples.rb
gecko-ruby-0.5.0 test/support/shared_sideloaded_data_parsing_examples.rb