diff options
Diffstat (limited to 'test/test_table.rb')
-rw-r--r-- | test/test_table.rb | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/test/test_table.rb b/test/test_table.rb index 8d37a8eaff..bb7bd255fd 100644 --- a/test/test_table.rb +++ b/test/test_table.rb @@ -6,6 +6,18 @@ module Arel @relation = Table.new(:users) end + it 'should return an insert manager' do + im = @relation.compile_insert 'VALUES(NULL)' + assert_kind_of Arel::InsertManager, im + assert_equal 'INSERT INTO NULL VALUES(NULL)', im.to_sql + end + + it 'should return IM from insert_manager' do + im = @relation.insert_manager + assert_kind_of Arel::InsertManager, im + assert_equal im.engine, @relation.engine + end + describe 'skip' do it 'should add an offset' do sm = @relation.skip 2 @@ -36,12 +48,6 @@ module Arel end describe 'backwards compat' do - describe 'joins' do - it 'returns nil' do - @relation.joins(nil).must_equal nil - end - end - describe 'join' do it 'noops on nil' do mgr = @relation.join nil @@ -168,13 +174,6 @@ module Arel it "manufactures an attribute if the symbol names an attribute within the relation" do column = @relation[:id] column.name.must_equal :id - column.must_be_kind_of Attributes::Integer - end - end - - describe 'when table does not exist' do - it 'returns nil' do - @relation[:foooo].must_be_nil end end end |