parent
155af88582
commit
80571567e1
3 changed files with 25 additions and 0 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -2624,6 +2624,7 @@ dependencies = [
|
|||
"percent-encoding",
|
||||
"rand 0.8.5",
|
||||
"regex",
|
||||
"reqwest",
|
||||
"reqwest-middleware",
|
||||
"rosetta-build",
|
||||
"rosetta-i18n",
|
||||
|
|
|
@ -47,5 +47,9 @@ jsonwebtoken = "8.1.1"
|
|||
lettre = "0.10.1"
|
||||
comrak = { version = "0.14.0", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
reqwest = { workspace = true }
|
||||
tokio = { workspace = true, features = ["macros"] }
|
||||
|
||||
[build-dependencies]
|
||||
rosetta-build = "0.1.2"
|
||||
|
|
|
@ -37,6 +37,7 @@ pub struct WebfingerLink {
|
|||
#[serde(rename = "type")]
|
||||
pub kind: Option<String>,
|
||||
pub href: Option<Url>,
|
||||
#[serde(default)]
|
||||
pub properties: HashMap<String, String>,
|
||||
}
|
||||
|
||||
|
@ -57,3 +58,22 @@ macro_rules! location_info {
|
|||
)
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use reqwest::Client;
|
||||
|
||||
#[tokio::test]
|
||||
#[ignore]
|
||||
async fn test_webfinger() {
|
||||
let client = Client::default();
|
||||
let fetch_url =
|
||||
"https://kino.schuerz.at/.well-known/webfinger?resource=acct:h0e@kino.schuerz.at";
|
||||
|
||||
let response = client.get(fetch_url).send().await.unwrap();
|
||||
|
||||
let res = response.json::<WebfingerResponse>().await;
|
||||
assert!(res.is_ok());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue