diff options
Diffstat (limited to 'spec/arel/select_manager_spec.rb')
-rw-r--r-- | spec/arel/select_manager_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/arel/select_manager_spec.rb b/spec/arel/select_manager_spec.rb index 0b45b8180c..883a518aca 100644 --- a/spec/arel/select_manager_spec.rb +++ b/spec/arel/select_manager_spec.rb @@ -22,9 +22,24 @@ module Arel end alias :update :execute alias :delete :execute + alias :insert :execute end describe 'select manager' do + describe 'insert' do + it 'uses the select FROM' do + engine = EngineProxy.new Table.engine + table = Table.new :users + manager = Arel::SelectManager.new engine + manager.from table + manager.insert 'VALUES(NULL)' + + engine.executed.last.should be_like %{ + INSERT INTO "users" VALUES(NULL) + } + end + end + describe 'lock' do # This should fail on other databases it 'adds a lock node' do |