Skip to content

Failing spec to expose problem mentioned in #384#487

Open
mikegee wants to merge 1 commit intobblimke:masterfrom
mikegee:complicated-query-string-bug
Open

Failing spec to expose problem mentioned in #384#487
mikegee wants to merge 1 commit intobblimke:masterfrom
mikegee:complicated-query-string-bug

Conversation

@mikegee
Copy link

@mikegee mikegee commented Jun 12, 2015

No description provided.

@mikegee
Copy link
Author

mikegee commented Jun 12, 2015

I suspect this spec doesn't belong here. And, I haven't looked into the implementation yet. Helpful suggestions are welcome.

@mikegee
Copy link
Author

mikegee commented Jun 13, 2015

lib/webmock/util/query_mapper.rb:199 is:

new_query_values.sort!

In my example, new_query_values is:

[["tags[]", {"baz"=>"quux"}], ["tags[]", {"foo"=>"bar"}]]

Sorting this is problematic because:

{'baz'=>'quux'} <=> {'foo'=>'bar'} # => nil

Array#sort! doesn't like nils.

@mikegee mikegee force-pushed the complicated-query-string-bug branch from 5b3fe81 to 40e7ec5 Compare June 13, 2015 02:36
@mikegee
Copy link
Author

mikegee commented Jun 13, 2015

I rewrote the spec and moved it to a better home.

@bblimke
Copy link
Owner

bblimke commented Jun 13, 2015

Thank you @mikegee This should help when developing the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants