aboutsummaryrefslogtreecommitdiffstats
path: root/test/nodes
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-03-21 14:58:15 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-03-21 14:58:15 -0700
commit83d045d2d8881e4310f0f54376a5e04d395f3c7a (patch)
treea2e88cd0c5d1aa629ac5702225c5ea48b807cb9f /test/nodes
parent856fd75c9b6defb7711f93e6ecda2932e98c4113 (diff)
parent05887fc406820f2e8fecc5cedcc42b87cf9f0ab1 (diff)
downloadrails-83d045d2d8881e4310f0f54376a5e04d395f3c7a.tar.gz
rails-83d045d2d8881e4310f0f54376a5e04d395f3c7a.tar.bz2
rails-83d045d2d8881e4310f0f54376a5e04d395f3c7a.zip
Merge branch 'master' of github.com:rails/arel
* 'master' of github.com:rails/arel: Make as factory method convert alias name to SqlLiteral Replace MathOperation with InfixOperation to support more operators
Diffstat (limited to 'test/nodes')
-rw-r--r--test/nodes/test_as.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/nodes/test_as.rb b/test/nodes/test_as.rb
index 8585fbc963..02cbe5f7b0 100644
--- a/test/nodes/test_as.rb
+++ b/test/nodes/test_as.rb
@@ -10,6 +10,12 @@ module Arel
assert_equal attr, as.left
assert_equal 'foo', as.right
end
+
+ it 'converts right to SqlLiteral if a string' do
+ attr = Table.new(:users)[:id]
+ as = attr.as('foo')
+ assert_kind_of Arel::Nodes::SqlLiteral, as.right
+ end
end
end
end