X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/a69f380fa5641192b55738d54f2c26e1403f6975..735493837b036f5609f42a363c7f58f04525194c:/vendor/gems/composite_primary_keys-2.2.2/test/test_santiago.rb diff --git a/vendor/gems/composite_primary_keys-2.2.2/test/test_santiago.rb b/vendor/gems/composite_primary_keys-2.2.2/test/test_santiago.rb index 4b5f433e4..771c414a7 100644 --- a/vendor/gems/composite_primary_keys-2.2.2/test/test_santiago.rb +++ b/vendor/gems/composite_primary_keys-2.2.2/test/test_santiago.rb @@ -1,27 +1,27 @@ -# 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 TestSantiago < 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 = User.find(1) - assert_not_nil @santiago.articles - assert_equal 2, @santiago.articles.length - assert_not_nil @santiago.readings - assert_equal 2, @santiago.readings.length - end -end +# 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 TestSantiago < 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 = User.find(1) + assert_not_nil @santiago.articles + assert_equal 2, @santiago.articles.length + assert_not_nil @santiago.readings + assert_equal 2, @santiago.readings.length + end +end