diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-19 21:19:09 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-20 14:04:50 -0600 |
commit | 135b3a0dde2edd013b666ab54d35b8b99220f0aa (patch) | |
tree | f6f335500089349ddb213076e645de0170331ccf /activerecord/test | |
parent | 776af48acb1035e70a326609ec5e5b632ef0c2c5 (diff) | |
download | rails-135b3a0dde2edd013b666ab54d35b8b99220f0aa.tar.gz rails-135b3a0dde2edd013b666ab54d35b8b99220f0aa.tar.bz2 rails-135b3a0dde2edd013b666ab54d35b8b99220f0aa.zip |
multiple key / values work
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/hstore_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/hstore_test.rb b/activerecord/test/cases/adapters/postgresql/hstore_test.rb index aa3bde09d8..5031486f29 100644 --- a/activerecord/test/cases/adapters/postgresql/hstore_test.rb +++ b/activerecord/test/cases/adapters/postgresql/hstore_test.rb @@ -37,4 +37,10 @@ class PostgresqlHstoreTest < ActiveRecord::TestCase x = Hstore.find :first assert_equal({'1' => '2'}, x.tags) end + + def test_select_multikey + @connection.execute "insert into hstores (tags) VALUES ('1=>2,2=>3')" + x = Hstore.find :first + assert_equal({'1' => '2', '2' => '3'}, x.tags) + end end |