aboutsummaryrefslogtreecommitdiffstats
path: root/test/nodes/test_as.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/nodes/test_as.rb')
-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