Skip to content

Commit

Permalink
Ignoring %23 in URI test
Browse files Browse the repository at this point in the history
  • Loading branch information
utopiatopia committed Jan 11, 2025
1 parent 36e87b3 commit ca8f64f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/bangs_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ def uri_decoded_urls(bangs)
next if bang["skip_tests"]

it "template should not be uri encoded (#{bang["s"]})" do
expect(CGI.unescapeURIComponent(bang["u"]).to_s).to eq(bang["u"])
expect(CGI.unescapeURIComponent(bang["u"].gsub(/%20|%23/,"")).to_s).to eq(bang["u"].gsub(/%20|%23/,""))
end

it "domain should not be uri encoded (#{bang["s"]})" do
expect(CGI.unescapeURIComponent(bang["d"]).to_s).to eq(bang["d"])
expect(CGI.unescapeURIComponent(bang["d"].gsub(/%20|%23/,"")).to_s).to eq(bang["d"].gsub(/%20|%23/,""))
end

if bang["ad"]
it "alt domain should not be uri encoded (#{bang["s"]})" do
expect(CGI.unescapeURIComponent(bang["ad"]).to_s).to eq(bang["ad"])
expect(CGI.unescapeURIComponent(bang["ad"].gsub(/%20|%23/,"")).to_s).to eq(bang["ad"].gsub(/%20|%23/,""))
end
end
end
Expand Down

0 comments on commit ca8f64f

Please sign in to comment.