mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FIX: Don't error out when trying to retrieve title and URL won't encode (#24660)
This commit is contained in:
@ -60,6 +60,12 @@ RSpec.describe FinalDestination do
|
||||
expect(fd.ignored).to eq(%w[test.localhost google.com meta.discourse.org])
|
||||
end
|
||||
|
||||
it "raises an error when URL is too long to encode" do
|
||||
expect {
|
||||
FinalDestination.new("https://meta.discourse.org/" + "x" * UrlHelper::MAX_URL_LENGTH)
|
||||
}.to raise_error(FinalDestination::UrlEncodingError)
|
||||
end
|
||||
|
||||
describe ".resolve" do
|
||||
it "has a ready status code before anything happens" do
|
||||
expect(fd("https://eviltrout.com").status).to eq(:ready)
|
||||
|
Reference in New Issue
Block a user