diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-05-04 15:14:33 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-05-04 15:14:33 -0700 |
commit | 5db56a513286814991c27000af2c0243cc19d1e2 (patch) | |
tree | ffc3e921b5b686592745cf388c92eee0fd5b9533 | |
parent | a98c9bdbdd233ff60457450deea80d2015ee1193 (diff) | |
download | rails-5db56a513286814991c27000af2c0243cc19d1e2.tar.gz rails-5db56a513286814991c27000af2c0243cc19d1e2.tar.bz2 rails-5db56a513286814991c27000af2c0243cc19d1e2.zip |
Add regression test
-rw-r--r-- | test/test_insert_manager.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_insert_manager.rb b/test/test_insert_manager.rb index b9ee6f76ac..97317791fe 100644 --- a/test/test_insert_manager.rb +++ b/test/test_insert_manager.rb @@ -136,6 +136,17 @@ module Arel INSERT INTO "users" VALUES (1) } end + + it "accepts sql literals" do + table = Table.new :users + manager = Arel::InsertManager.new + manager.into table + + manager.values = Arel.sql("DEFAULT VALUES") + manager.to_sql.must_be_like %{ + INSERT INTO "users" DEFAULT VALUES + } + end end describe "combo" do |