From bfca378f8f6c24fac252ac94b3ce6d4e0dd75d9d Mon Sep 17 00:00:00 2001 From: Stormwind Date: Sat, 22 Dec 2012 13:09:15 +0100 Subject: Add first implementation of decode_www_form_18 Seperates now foo=bar&bar=foo;baz=foo queries. But does not fix url encoded strings and such things. Also added testcase for an empty query string. --- spec/unit/uri/parse_query_string_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'spec/unit/uri/parse_query_string_spec.rb') diff --git a/spec/unit/uri/parse_query_string_spec.rb b/spec/unit/uri/parse_query_string_spec.rb index a2c078b..a165cf3 100644 --- a/spec/unit/uri/parse_query_string_spec.rb +++ b/spec/unit/uri/parse_query_string_spec.rb @@ -108,4 +108,12 @@ describe URI, '#parse_query_string' do result.should eq([['foo[]', 'foo'], ['foo[]', 'bar']]) end + it 'returns an empty array, if query string is empty' do + result = URI::parse_query_string("") + + result.should eq([]) + end + + # what happend on more than one = without an & or ; in between? + end -- cgit v1.2.3-70-g09d2