aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/method_scoping_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/method_scoping_test.rb')
-rw-r--r--activerecord/test/cases/method_scoping_test.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/activerecord/test/cases/method_scoping_test.rb b/activerecord/test/cases/method_scoping_test.rb
index e93f22bede..6cd42ff936 100644
--- a/activerecord/test/cases/method_scoping_test.rb
+++ b/activerecord/test/cases/method_scoping_test.rb
@@ -77,11 +77,13 @@ class MethodScopingTest < ActiveRecord::TestCase
end
end
- def test_options_select_replaces_scope_select
- Developer.send(:with_scope, :find => { :select => "id, name" }) do
+ def test_scope_select_concatenates
+ Developer.send(:with_scope, :find => { :select => "name" }) do
developer = Developer.find(:first, :select => 'id, salary', :conditions => "name = 'David'")
assert_equal 80000, developer.salary
- assert !developer.has_attribute?(:name)
+ assert developer.has_attribute?(:id)
+ assert developer.has_attribute?(:name)
+ assert developer.has_attribute?(:salary)
end
end