From 40e7ec57215fce851c86afc7e4ddb6be532675df Mon Sep 17 00:00:00 2001 From: Michael Gee Date: Fri, 12 Jun 2015 18:48:24 -0400 Subject: [PATCH] Failing spec to expose problem mentioned in #384 --- spec/unit/util/query_mapper_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/unit/util/query_mapper_spec.rb b/spec/unit/util/query_mapper_spec.rb index e1bb2d5d8..7c3fc6198 100644 --- a/spec/unit/util/query_mapper_spec.rb +++ b/spec/unit/util/query_mapper_spec.rb @@ -101,4 +101,12 @@ expect(subject.values_to_query values).to eq query expect(subject.query_to_values query).to eq values end + + it 'converts a hash with an array of hashes',focus:true do + query = 'tags%5B%5D%5Ba%5D=1&tags%5B%5D%5Bb%5D=2' + values = {"tags" => [{"a" => "1", "b" => "2"}]} + expect(subject.values_to_query values).to eq query + expect(subject.query_to_values query).to eq values + end + end