Sha256: 781c901f2c8c73716ef315d67ff00c6c7b8dcd9be6923e5975a0e228ea85663b

Contents?: true

Size: 572 Bytes

Versions: 4

Compression:

Stored size: 572 Bytes

Contents

require 'cases/helper'
require 'models/record_store'
require 'models/artist'

class HabtmIntegerToIntegerAssociationTest < ActiveRecord::TestCase
  fixtures :record_stores
  fixtures :artists

  def test_association_find
    record_store = record_stores(:amoeba)
    artists = record_store.artists
    assert_equal 6, artists.size
    artists.each do |artists|
      assert artists.instance_of?(Artist)
    end
  end
  
  def test_empty_assocation_find
    record_store = record_stores(:tower)
    artists = record_store.artists
    assert_equal 0, artists.size
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gold-record-0.2.2 test/cases/associations/habtm_integer_to_uuid_association_test.rb
gold-record-0.2.1 test/cases/associations/habtm_integer_to_uuid_association_test.rb
gold-record-0.2.0 test/cases/associations/habtm_integer_to_uuid_association_test.rb
gold-record-0.1.0 test/cases/associations/habtm_integer_to_uuid_association_test.rb