Sha256: 32047138cbea9f63f49ed55ebb760a96d5e4a65ddfcb393572e788e900996628

Contents?: true

Size: 640 Bytes

Versions: 1

Compression:

Stored size: 640 Bytes

Contents

require 'helper'

class AxleAttributes::SerializationsTest < ActiveSupport::TestCase
  class Pet < Superstore::Base
    include AxleAttributes::SerializedChild

    has_attribute :color, type: :string
  end

  class Person < Business
    serialize_many :pets, class_name: 'AxleAttributes::SerializationsTest::Pet'
    serialize_one :favorite, class_name: 'AxleAttributes::SerializationsTest::Pet'
  end

  test 'serialized_many' do
    assert Person.serialized_many? 'pets'
    assert Person.serialized_many? :pets
    refute Person.serialized_many? :favorite
    refute Person.serialized_many? :unknown
  end

  test 'reload' do
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axle_attributes-1.13.2 test/lib/serializations_test.rb