aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-12-20 11:18:36 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-12-20 14:04:50 -0600
commit96838b5192e46caecc73cf45968fd27b78a41404 (patch)
tree7314876d8b11f739809114be0d961e03b50c9da0 /activerecord/test/cases/adapters
parent135b3a0dde2edd013b666ab54d35b8b99220f0aa (diff)
downloadrails-96838b5192e46caecc73cf45968fd27b78a41404.tar.gz
rails-96838b5192e46caecc73cf45968fd27b78a41404.tar.bz2
rails-96838b5192e46caecc73cf45968fd27b78a41404.zip
can create hstore records via AR API
Diffstat (limited to 'activerecord/test/cases/adapters')
-rw-r--r--activerecord/test/cases/adapters/postgresql/hstore_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/hstore_test.rb b/activerecord/test/cases/adapters/postgresql/hstore_test.rb
index 5031486f29..7267536142 100644
--- a/activerecord/test/cases/adapters/postgresql/hstore_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/hstore_test.rb
@@ -43,4 +43,11 @@ class PostgresqlHstoreTest < ActiveRecord::TestCase
x = Hstore.find :first
assert_equal({'1' => '2', '2' => '3'}, x.tags)
end
+
+ def test_create
+ hash = { 'a' => 'b', '1' => '2' }
+ x = Hstore.create!(:tags => hash)
+ x.reload
+ assert_equal hash, x.tags
+ end
end