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:
parent
502b43f009
commit
40f31b6f5e
1 changed files with 16 additions and 0 deletions
|
@ -56,6 +56,22 @@ module Arel
|
||||||
end
|
end
|
||||||
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
|
describe 'joins' do
|
||||||
it 'returns join sql' do
|
it 'returns join sql' do
|
||||||
table = Table.new :users
|
table = Table.new :users
|
||||||
|
|
Loading…
Reference in a new issue