diff options
Diffstat (limited to 'test/test_select_manager.rb')
-rw-r--r-- | test/test_select_manager.rb | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/test/test_select_manager.rb b/test/test_select_manager.rb index 7f025f7a02..6258705e2f 100644 --- a/test/test_select_manager.rb +++ b/test/test_select_manager.rb @@ -519,12 +519,28 @@ module Arel it 'should create join nodes with a klass' do relation = Arel::SelectManager.new Table.engine + join = relation.create_join 'foo', 'bar', Arel::Nodes::FullOuterJoin + assert_kind_of Arel::Nodes::FullOuterJoin, join + assert_equal 'foo', join.left + assert_equal 'bar', join.right + end + + it 'should create join nodes with a klass' do + relation = Arel::SelectManager.new Table.engine join = relation.create_join 'foo', 'bar', Arel::Nodes::OuterJoin assert_kind_of Arel::Nodes::OuterJoin, join assert_equal 'foo', join.left assert_equal 'bar', join.right end + it 'should create join nodes with a klass' do + relation = Arel::SelectManager.new Table.engine + join = relation.create_join 'foo', 'bar', Arel::Nodes::RightOuterJoin + assert_kind_of Arel::Nodes::RightOuterJoin, join + assert_equal 'foo', join.left + assert_equal 'bar', join.right + end + describe 'join' do it 'responds to join' do left = Table.new :users @@ -612,16 +628,6 @@ module Arel end end - describe 'order_clauses' do - it 'returns order clauses as a list' do - table = Table.new :users - manager = Arel::SelectManager.new Table.engine - manager.from table - manager.order table[:id] - manager.order_clauses.first.must_be_like %{ "users"."id" } - end - end - describe 'group' do it 'takes an attribute' do table = Table.new :users |