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.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/nodes/test_as.rb b/test/nodes/test_as.rb
new file mode 100644
index 0000000000..8585fbc963
--- /dev/null
+++ b/test/nodes/test_as.rb
@@ -0,0 +1,16 @@
+require 'helper'
+
+module Arel
+ module Nodes
+ describe 'As' do
+ describe '#as' do
+ it 'makes an AS node' do
+ attr = Table.new(:users)[:id]
+ as = attr.as(Arel.sql('foo'))
+ assert_equal attr, as.left
+ assert_equal 'foo', as.right
+ end
+ end
+ end
+ end
+end