Skip to content

Commit

Permalink
test: remove use of deprecated URI.encode
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Aug 4, 2021
1 parent 222ca81 commit bec6ae9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/lib/rack/pact_broker/invalid_uri_protection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module PactBroker
describe InvalidUriProtection do
let(:target_app) { ->(_env){ [200, {}, []] } }
let(:app) { InvalidUriProtection.new(target_app) }
let(:path) { URI.encode("/foo") }
let(:path) { "/foo" }

subject { get(path) }

Expand All @@ -28,7 +28,7 @@ module PactBroker
end

context "when the URI contains a new line because someone forgot to strip the result of `git rev-parse HEAD`, and I have totally never done this before myself" do
let(:path) { URI.encode("/foo\n/bar") }
let(:path) { "/foo%0A/bar" }

it "returns a 422" do
expect(subject.status).to eq 422
Expand All @@ -37,7 +37,7 @@ module PactBroker
end

context "when the URI contains a tab because sooner or later someone is eventually going to do this" do
let(:path) { URI.encode("/foo\t/bar") }
let(:path) { "/foo%09/bar" }

it "returns a 422" do
expect(subject.status).to eq 422
Expand Down

0 comments on commit bec6ae9

Please sign in to comment.