1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

failing test for join on select manager

This commit is contained in:
Aaron Patterson 2010-09-07 14:49:37 -07:00
parent 502b43f009
commit 40f31b6f5e

View file

@ -56,6 +56,22 @@ module Arel
end
end
describe 'join' do
it 'responds to join' do
left = Table.new :users
right = left.alias
predicate = left[:id].eq(right[:id])
manager = Arel::SelectManager.new Table.engine
manager.join(right).on(predicate)
manager.to_sql.should be_like %{
SELECT FROM "users"
OUTER JOIN "users" "users_2"
ON "users"."id" = "users_2"."id"
}
end
end
describe 'joins' do
it 'returns join sql' do
table = Table.new :users