mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-16 09:24:00 +00:00
Merge remote-tracking branch 'lemmynet/fix_sitemetadata_test' into asonix/document-opentelemetry-url
This commit is contained in:
commit
1546e5fd0d
1 changed files with 12 additions and 5 deletions
|
@ -288,15 +288,22 @@ mod tests {
|
||||||
.build()
|
.build()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.into();
|
.into();
|
||||||
let sample_url = Url::parse("https://www.redspark.nu/en/peoples-war/district-leader-of-chand-led-cpn-arrested-in-bhojpur/").unwrap();
|
let sample_url = Url::parse("https://gitlab.com/IzzyOnDroid/repo/-/wikis/FAQ").unwrap();
|
||||||
let sample_res = fetch_site_metadata(&client, &sample_url).await.unwrap();
|
let sample_res = fetch_site_metadata(&client, &sample_url).await.unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
SiteMetadata {
|
SiteMetadata {
|
||||||
title: Some("District Leader Of Chand Led CPN Arrested In Bhojpur - Redspark".to_string()),
|
title: Some("FAQ · Wiki · IzzyOnDroid / repo".to_string()),
|
||||||
description: Some("BHOJPUR: A district leader of the outlawed Netra Bikram Chand alias Biplav-led outfit has been arrested. According to District Police".to_string()),
|
description: Some(
|
||||||
image: Some(Url::parse("https://www.redspark.nu/wp-content/uploads/2020/03/netra-bikram-chand-attends-program-1272019033653-1000x0-845x653-1.jpg").unwrap()),
|
"The F-Droid compatible repo at https://apt.izzysoft.de/fdroid/".to_string()
|
||||||
|
),
|
||||||
|
image: Some(
|
||||||
|
Url::parse("https://gitlab.com/uploads/-/system/project/avatar/4877469/iod_logo.png")
|
||||||
|
.unwrap()
|
||||||
|
),
|
||||||
html: None,
|
html: None,
|
||||||
}, sample_res);
|
},
|
||||||
|
sample_res
|
||||||
|
);
|
||||||
|
|
||||||
let youtube_url = Url::parse("https://www.youtube.com/watch?v=IquO_TcMZIQ").unwrap();
|
let youtube_url = Url::parse("https://www.youtube.com/watch?v=IquO_TcMZIQ").unwrap();
|
||||||
let youtube_res = fetch_site_metadata(&client, &youtube_url).await.unwrap();
|
let youtube_res = fetch_site_metadata(&client, &youtube_url).await.unwrap();
|
||||||
|
|
Loading…
Reference in a new issue