Sha256: a43bcea96b43cb001b5df03b93fe2c77ff9a4f0f7a49ccafbae292e241ee5c25

Contents?: true

Size: 595 Bytes

Versions: 7

Compression:

Stored size: 595 Bytes

Contents

# frozen_string_literal: true

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.12.3 test/support/shared_sideloaded_data_parsing_examples.rb
gecko-ruby-0.12.2 test/support/shared_sideloaded_data_parsing_examples.rb
gecko-ruby-0.12.1 test/support/shared_sideloaded_data_parsing_examples.rb
gecko-ruby-0.12.0 test/support/shared_sideloaded_data_parsing_examples.rb
gecko-ruby-0.11.1 test/support/shared_sideloaded_data_parsing_examples.rb
gecko-ruby-0.11.0 test/support/shared_sideloaded_data_parsing_examples.rb
gecko-ruby-0.10.0 test/support/shared_sideloaded_data_parsing_examples.rb