diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-03 11:14:19 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-03 11:14:19 -0700 |
commit | 31c79e291f42b1d862df06c552fe002864aae705 (patch) | |
tree | 52f4b4e25d370ad5b017259e4a2cb01f48c4c6b9 /activerecord/test/cases | |
parent | 83c4b0a7f977b75a9005ceb78d8a2a719392d904 (diff) | |
parent | cf1904f65bffcf6833903d4a30770eddc5713486 (diff) | |
download | rails-31c79e291f42b1d862df06c552fe002864aae705.tar.gz rails-31c79e291f42b1d862df06c552fe002864aae705.tar.bz2 rails-31c79e291f42b1d862df06c552fe002864aae705.zip |
Merge pull request #12084 from Ben-M/3-2-stable
Fix STI scopes using benolee's suggestion. Fixes #11939
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/inheritance_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/inheritance_test.rb b/activerecord/test/cases/inheritance_test.rb index 99a252a389..e4cd89e563 100644 --- a/activerecord/test/cases/inheritance_test.rb +++ b/activerecord/test/cases/inheritance_test.rb @@ -236,6 +236,11 @@ class InheritanceTest < ActiveRecord::TestCase assert_nothing_raised { s = SpecialSubscriber.new("name" => "And breaaaaathe!"); s.id = 'roger'; s.save } end + def test_scope_inherited_properly + assert_nothing_raised { Company.of_first_firm } + assert_nothing_raised { Client.of_first_firm } + end + private def switch_to_alt_inheritance_column # we don't want misleading test results, so get rid of the values in the type column |