Sha256: e55aea169f1063b3d34f21b53636b3b457bd3bbcd89e049add8886066d19b07c
Contents?: true
Size: 814 Bytes
Versions: 8
Compression:
Stored size: 814 Bytes
Contents
# Test cases devised by Santiago that broke the Composite Primary Keys # code at one point in time. But no more!!! require 'abstract_unit' require 'fixtures/user' require 'fixtures/article' require 'fixtures/reading' class AssociationTest < Test::Unit::TestCase fixtures :suburbs, :streets, :users, :articles, :readings def test_normal_and_composite_associations assert_not_nil @suburb = Suburb.find(1,1) assert_equal 1, @suburb.streets.length assert_not_nil @street = Street.find(1) assert_not_nil @street.suburb end def test_single_keys @santiago = users(:santiago) assert_not_nil @santiago.articles assert_equal 2, @santiago.articles.length assert_not_nil @santiago.readings assert_equal 2, @santiago.readings.length end end
Version data entries
8 entries across 8 versions & 1 rubygems