diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-10 15:48:16 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-10 15:50:01 -0700 |
commit | b440aeb54a969ec25228881dd02eb019bbfd7c1e (patch) | |
tree | b6dca4a7108f44b04140b84391b1804b5d93811c /activerecord/test/cases | |
parent | fb14c88e39cd28f1e9bf54ef79b85cc085a9f034 (diff) | |
download | rails-b440aeb54a969ec25228881dd02eb019bbfd7c1e.tar.gz rails-b440aeb54a969ec25228881dd02eb019bbfd7c1e.tar.bz2 rails-b440aeb54a969ec25228881dd02eb019bbfd7c1e.zip |
PostgreSQL: insert looks up pk and sequence name if not given. [#384 state:resolved]
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/database_statements_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/activerecord/test/cases/database_statements_test.rb b/activerecord/test/cases/database_statements_test.rb new file mode 100644 index 0000000000..6274d5250f --- /dev/null +++ b/activerecord/test/cases/database_statements_test.rb @@ -0,0 +1,12 @@ +require "cases/helper" + +class DatabaseStatementsTest < ActiveRecord::TestCase + def setup + @connection = ActiveRecord::Base.connection + end + + def test_insert_should_return_the_inserted_id + id = @connection.insert("INSERT INTO accounts (firm_id,credit_limit) VALUES (42,5000)") + assert_not_nil id + end +end |