diff options
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/named_scope_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/named_scope_test.rb b/activerecord/test/cases/named_scope_test.rb index 3e2bd58f9a..2c34ab787d 100644 --- a/activerecord/test/cases/named_scope_test.rb +++ b/activerecord/test/cases/named_scope_test.rb @@ -379,6 +379,12 @@ class NamedScopeTest < ActiveRecord::TestCase def test_deprecated_named_scope_method assert_deprecated('named_scope has been deprecated') { Topic.named_scope :deprecated_named_scope } end + + def test_index_on_named_scope + approved = Topic.approved.order('id ASC') + assert_equal topics(:second), approved[0] + assert approved.loaded? + end end class DynamicScopeMatchTest < ActiveRecord::TestCase |