diff options
-rw-r--r-- | test/test_select_manager.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/test_select_manager.rb b/test/test_select_manager.rb index 3b5ded8389..4b4733db97 100644 --- a/test/test_select_manager.rb +++ b/test/test_select_manager.rb @@ -126,6 +126,24 @@ module Arel mgr.to_sql.must_be_like %{ SELECT FROM "users" HAVING foo AND bar } end end + + describe 'on' do + it 'converts to sqlliterals' do + table = Table.new :users + right = table.alias + mgr = table.from table + mgr.join(right).on("omg") + mgr.to_sql.must_be_like %{ SELECT FROM "users" INNER JOIN "users" "users_2" ON omg } + end + + it 'converts to sqlliterals' do + table = Table.new :users + right = table.alias + mgr = table.from table + mgr.join(right).on("omg", "123") + mgr.to_sql.must_be_like %{ SELECT FROM "users" INNER JOIN "users" "users_2" ON omg AND 123 } + end + end end describe 'clone' do |