diff options
Diffstat (limited to 'test/test_table.rb')
-rw-r--r-- | test/test_table.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_table.rb b/test/test_table.rb index b4c2a65fcd..286ad10167 100644 --- a/test/test_table.rb +++ b/test/test_table.rb @@ -96,6 +96,20 @@ module Arel } end end + + describe 'join' do + it 'creates an outer join' do + right = @relation.alias + predicate = @relation[:id].eq(right[:id]) + mgr = @relation.outer_join(right).on(predicate) + + mgr.to_sql.must_be_like %{ + SELECT FROM "users" + LEFT OUTER JOIN "users" "users_2" + ON "users"."id" = "users_2"."id" + } + end + end end describe 'group' do |