diff options
author | Ben Maraney <ben@maraney.com> | 2013-08-30 12:25:10 +0300 |
---|---|---|
committer | Ben Maraney <ben@maraney.com> | 2013-08-30 12:58:41 +0300 |
commit | cf1904f65bffcf6833903d4a30770eddc5713486 (patch) | |
tree | 98c90f83015d2c900dbe1e65d8cb4e828a8ab0af /activerecord/test/cases | |
parent | 59a35610459da7368e79179c9d33bc6e4697adb1 (diff) | |
download | rails-cf1904f65bffcf6833903d4a30770eddc5713486.tar.gz rails-cf1904f65bffcf6833903d4a30770eddc5713486.tar.bz2 rails-cf1904f65bffcf6833903d4a30770eddc5713486.zip |
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 |