Skip to content

Commit

Permalink
Use a tweet url whose author name is unlikely to change
Browse files Browse the repository at this point in the history
  • Loading branch information
saket committed Jun 18, 2023
1 parent ba839d9 commit fa69c4d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions unfurl/src/test/kotlin/me/saket/unfurl/UnfurlerTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ class UnfurlerTest {

@Test fun `unfurl tweets without javascript`() {
// This does not use a mock web-server to ensure my workaround for scraping tweets is still working.
val result = unfurler.unfurl("https://twitter.com/silvr/status/1556699622697062401")
val result = unfurler.unfurl("https://twitter.com/Twitter/status/1577730467436138524")

assertThat(result).isEqualTo(
UnfurlResult(
url = "https://twitter.com/silvr/status/1556699622697062401".toHttpUrl(),
title = "Alex Silver on Twitter",
url = "https://twitter.com/Twitter/status/1577730467436138524".toHttpUrl(),
title = "Twitter on Twitter",
description = """
|“When it comes to pizza like this:
|“whoa, it works
|
|Do you want a corner or a side?
|now everyone can mix GIFs, videos, and images in one Tweet, available on iOS and Android
""".trimMargin(),
thumbnail = "https://pbs.twimg.com/media/FZqCDf0WAAA3yS_.jpg:large".toHttpUrl(),
thumbnail = "https://pbs.twimg.com/tweet_video_thumb/FeU5fh1XkA0vDAE.jpg:large".toHttpUrl(),
favicon = "https://abs.twimg.com/favicons/twitter.2.ico".toHttpUrl(),
)
)
Expand Down

0 comments on commit fa69c4d

Please sign in to comment.