diff options
Diffstat (limited to 'activerecord/test/associations_extensions_test.rb')
-rw-r--r-- | activerecord/test/associations_extensions_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/activerecord/test/associations_extensions_test.rb b/activerecord/test/associations_extensions_test.rb new file mode 100644 index 0000000000..92bdb86eb5 --- /dev/null +++ b/activerecord/test/associations_extensions_test.rb @@ -0,0 +1,15 @@ +require 'abstract_unit' +require 'fixtures/project' +require 'fixtures/developer' + +class AssociationsExtensionsTest < Test::Unit::TestCase + fixtures :projects, :developers + + def test_extension_on_habtm + assert_equal projects(:action_controller), developers(:david).projects.find_most_recent + end + + def test_extension_on_has_many + assert_equal comments(:more_greetings), posts(:welcome).comments.find_most_recent + end +end
\ No newline at end of file |