Skip to content

Commit

Permalink
Failing spec to expose problem mentioned in #384
Browse files Browse the repository at this point in the history
  • Loading branch information
mikegee committed Jun 12, 2015
1 parent 8b31754 commit 5b3fe81
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/acceptance/shared/stubbing_requests.rb
Expand Up @@ -44,6 +44,11 @@
end

describe "based on query params" do
it 'does not raise',focus:true do
url = 'http://example.com?tags%5B%5D%5Bbaz%5D=quux&tags%5B%5D%5Bfoo%5D=bar'
expect { stub_request(:get, url) }.to_not raise_error
end

it "should return stubbed response when stub declares query params as a hash" do
stub_request(:get, "www.example.com").with(:query => {"a" => ["b x", "c d"]}).to_return(:body => "abc")
expect(http_request(:get, "http://www.example.com/?a[]=b+x&a[]=c%20d").body).to eq("abc")
Expand Down

0 comments on commit 5b3fe81

Please sign in to comment.