aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/base_test.rb
diff options
context:
space:
mode:
authorSławosz Sławiński <slawosz@gmail.com>2011-07-23 21:35:16 +0200
committerXavier Noria <fxn@hashref.com>2011-08-13 16:22:16 -0700
commite7f7439d068f587db91e959ef803606cae9e7cc5 (patch)
treee0bff70a29eda8136c0e8502c8e8f146c9a0d8d9 /activerecord/test/cases/base_test.rb
parent5004aaffc1c2bf81dfd23178b8ad691f0cecef26 (diff)
downloadrails-e7f7439d068f587db91e959ef803606cae9e7cc5.tar.gz
rails-e7f7439d068f587db91e959ef803606cae9e7cc5.tar.bz2
rails-e7f7439d068f587db91e959ef803606cae9e7cc5.zip
allow select to have multiple arguments
Diffstat (limited to 'activerecord/test/cases/base_test.rb')
-rw-r--r--activerecord/test/cases/base_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb
index f2f5b73626..84b66fdf49 100644
--- a/activerecord/test/cases/base_test.rb
+++ b/activerecord/test/cases/base_test.rb
@@ -123,6 +123,11 @@ class BasicsTest < ActiveRecord::TestCase
assert_equal Topic.all.map(&:id).sort, topic_ids
end
+ def test_select_symbol_for_many_arguments
+ topics = Topic.select(:id, :author_name).map{|topic| [topic.id, topic.author_name]}.sort
+ assert_equal Topic.all.map{|topic| [topic.id,topic.author_name]}.sort, topics
+ end
+
def test_table_exists
assert !NonExistentTable.table_exists?
assert Topic.table_exists?