aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_table.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_table.rb')
-rw-r--r--test/test_table.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_table.rb b/test/test_table.rb
index 8d37a8eaff..b9998174a1 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