aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-12-22 18:02:56 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-12-22 18:02:56 -0800
commit162e1d8df332f170b9dafdc91f60ee2cb359c1e5 (patch)
tree5368658186f0ffb13b1c3b61e4a85d0830e9a964 /test
parenta75ed569346c98c27c9ab1ec9c91332ffd4892b3 (diff)
downloadrails-162e1d8df332f170b9dafdc91f60ee2cb359c1e5.tar.gz
rails-162e1d8df332f170b9dafdc91f60ee2cb359c1e5.tar.bz2
rails-162e1d8df332f170b9dafdc91f60ee2cb359c1e5.zip
sql literals may be used as column attributes
Diffstat (limited to 'test')
-rw-r--r--test/visitors/test_to_sql.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb
index 80384d3c28..530bd73f6d 100644
--- a/test/visitors/test_to_sql.rb
+++ b/test/visitors/test_to_sql.rb
@@ -5,7 +5,14 @@ module Arel
describe 'the to_sql visitor' do
before do
@visitor = ToSql.new Table.engine
- @attr = Table.new(:users)[:id]
+ @table = Table.new(:users)
+ @attr = @table[:id]
+ end
+
+ it 'should not quote sql literals' do
+ node = @table[Arel.star]
+ sql = @visitor.accept node
+ sql.must_be_like '"users".*'
end
describe 'equality' do