From 135b3a0dde2edd013b666ab54d35b8b99220f0aa Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 19 Dec 2011 21:19:09 -0800 Subject: multiple key / values work --- activerecord/test/cases/adapters/postgresql/hstore_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activerecord/test/cases') 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 -- cgit v1.2.3