Sha256: 91d75339fce815b5ba05a9d91637798c306179bffd3f3c4b473aa4bb8227fb4a

Contents?: true

Size: 513 Bytes

Versions: 54

Compression:

Stored size: 513 Bytes

Contents

require File.expand_path('../abstract_unit', __FILE__)

class TestDumpable < ActiveSupport::TestCase
  fixtures :articles, :readings, :users

  def test_marshal_with_simple_preload
    articles = Article.preload(:readings).where(id: 1).to_a
    assert_equal(Marshal.load(Marshal.dump(articles)), articles)
  end

  def test_marshal_with_comples_preload
    articles = Article.preload({ readings: :user }).where(id: 1).to_a
    assert_equal(Marshal.load(Marshal.dump(articles)), articles)
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
composite_primary_keys-13.0.1 test/test_dumpable.rb
composite_primary_keys-13.0.0 test/test_dumpable.rb
composite_primary_keys-12.0.10 test/test_dumpable.rb
composite_primary_keys-12.0.9 test/test_dumpable.rb
composite_primary_keys-12.0.8 test/test_dumpable.rb
composite_primary_keys-12.0.6 test/test_dumpable.rb
composite_primary_keys-12.0.5 test/test_dumpable.rb
composite_primary_keys-12.0.4 test/test_dumpable.rb
composite_primary_keys-12.0.3 test/test_dumpable.rb
composite_primary_keys-12.0.2 test/test_dumpable.rb
composite_primary_keys-11.3.1 test/test_dumpable.rb
composite_primary_keys-8.1.8 test/test_dumpable.rb
composite_primary_keys-12.0.1 test/test_dumpable.rb
composite_primary_keys-12.0.0 test/test_dumpable.rb
composite_primary_keys-12.0.0.rc5 test/test_dumpable.rb
composite_primary_keys-12.0.0.rc4 test/test_dumpable.rb
composite_primary_keys-12.0.0.rc3 test/test_dumpable.rb
composite_primary_keys-12.0.0.rc2 test/test_dumpable.rb
composite_primary_keys-12.0.0.rc1 test/test_dumpable.rb
composite_primary_keys-8.1.7 test/test_dumpable.rb