Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Test case: fixture table name is defined in model

  • Loading branch information...
commit d3e6e7e484c21d40e8fb7f765099f280f5de85e0 1 parent e0ef093
@alexeymuranov alexeymuranov authored alexeymuranov committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 activerecord/test/cases/fixtures_test.rb
View
5 activerecord/test/cases/fixtures_test.rb
@@ -772,4 +772,9 @@ def test_named_accessor_for_randomly_named_namespaced_fixture_and_class
assert_kind_of Admin::ClassNameThatDoesNotFollowCONVENTIONS,
admin_randomly_named_b0(:second_instance)
end
+
+ def test_table_name_is_defined_in_the_model
+ assert_equal :randomly_named_table, ActiveRecord::Fixtures::all_loaded_fixtures["admin/randomly_named_a9"].table_name
+ assert_equal :randomly_named_table, Admin::ClassNameThatDoesNotFollowCONVENTIONS.table_name
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.