TEST: Adds test for urls with url-encoded section hash

This commit is contained in:
Chema Balsas 2021-08-11 21:55:50 +01:00 committed by Robin Ward
parent 6b8ee4d5ef
commit 745b99edbf
2 changed files with 582 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@ -32,4 +32,17 @@ describe Onebox::Engine::WikipediaOnebox do
expect(html).to include("The film score was composed") expect(html).to include("The film score was composed")
end end
end end
context "url with url-encoded section hash" do
before do
@link = "https://fr.wikipedia.org/wiki/Th%C3%A9ologie#La_th%C3%A9ologie_selon_Aristote"
stub_request(:get, "https://fr.wikipedia.org/wiki/Th%C3%A9ologie")
.to_return(status: 200, body: onebox_response("wikipedia_url_encoded"))
end
it "includes summary" do
expect(html).to include("Le terme est repris par")
end
end
end end