From 9f2e885ce8d5cbf6999b22e274ec245d9007131d Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 29 Nov 2010 13:32:02 -0800 Subject: testing attributes applied by default_scope --- activerecord/test/cases/relation_scoping_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activerecord') diff --git a/activerecord/test/cases/relation_scoping_test.rb b/activerecord/test/cases/relation_scoping_test.rb index dae9721a63..c7f7738248 100644 --- a/activerecord/test/cases/relation_scoping_test.rb +++ b/activerecord/test/cases/relation_scoping_test.rb @@ -464,6 +464,11 @@ class DefaultScopingTest < ActiveRecord::TestCase assert_equal 50000, PoorDeveloperCalledJamis.create!(:name => 'David').salary end + def test_default_scope_attribute + jamis = PoorDeveloperCalledJamis.new(:name => 'David') + assert_equal 50000, jamis.salary + end + def test_scope_composed_by_limit_and_then_offset_is_equal_to_scope_composed_by_offset_and_then_limit posts_limit_offset = Post.limit(3).offset(2) posts_offset_limit = Post.offset(2).limit(3) -- cgit v1.2.3