diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-15 15:46:13 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-15 15:46:13 -0700 |
commit | 552636c65240c7104054d0a4ef63cde9622d838d (patch) | |
tree | 9e05c9293fb7c484a970d46dff7e3b51dfa9a056 | |
parent | 1dd266741e04dbba93d29704c58b951fb19af652 (diff) | |
download | rails-552636c65240c7104054d0a4ef63cde9622d838d.tar.gz rails-552636c65240c7104054d0a4ef63cde9622d838d.tar.bz2 rails-552636c65240c7104054d0a4ef63cde9622d838d.zip |
testing that symbols work as sql literals
-rw-r--r-- | activerecord/test/cases/base_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index 16fd9a7465..d9c7aa16c1 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -48,6 +48,11 @@ class Boolean < ActiveRecord::Base; end class BasicsTest < ActiveRecord::TestCase fixtures :topics, :companies, :developers, :projects, :computers, :accounts, :minimalistics, 'warehouse-things', :authors, :categorizations, :categories, :posts + def test_select_symbol + topic_ids = Topic.select(:id).map(&:id).sort + assert_equal Topic.find(:all).map(&:id), topic_ids + end + def test_table_exists assert !NonExistentTable.table_exists? assert Topic.table_exists? |