mirror of
https://github.com/LemmyNet/activitypub-federation-rust.git
synced 2024-06-02 13:29:36 +00:00
better test log
This commit is contained in:
parent
5da52d4ce1
commit
dd1cd5eeb1
|
@ -260,9 +260,9 @@ pub mod tests {
|
|||
#[test]
|
||||
fn test_should_refetch_object() {
|
||||
let one_second_ago = Utc::now() - ChronoDuration::seconds(1);
|
||||
assert!(!should_refetch_object(one_second_ago.into()));
|
||||
assert!(!should_refetch_object(one_second_ago));
|
||||
|
||||
let two_days_ago = Utc::now() - ChronoDuration::days(2);
|
||||
assert!(should_refetch_object(two_days_ago.into()));
|
||||
assert!(should_refetch_object(two_days_ago));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -221,7 +221,7 @@ mod tests {
|
|||
};
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_webfinger() {
|
||||
async fn test_webfinger() -> Result<(), Error> {
|
||||
let config = FederationConfig::builder()
|
||||
.domain("example.com")
|
||||
.app_data(DbConnection)
|
||||
|
@ -229,12 +229,10 @@ mod tests {
|
|||
.await
|
||||
.unwrap();
|
||||
let data = config.to_request_data();
|
||||
let res =
|
||||
webfinger_resolve_actor::<DbConnection, DbUser>("LemmyDev@mastodon.social", &data)
|
||||
.await;
|
||||
assert!(res.is_ok());
|
||||
|
||||
webfinger_resolve_actor::<DbConnection, DbUser>("LemmyDev@mastodon.social", &data).await?;
|
||||
// poa.st is as of 2023-07-14 the largest Pleroma instance
|
||||
let res = webfinger_resolve_actor::<DbConnection, DbUser>("graf@poa.st", &data).await;
|
||||
assert!(res.is_ok());
|
||||
webfinger_resolve_actor::<DbConnection, DbUser>("graf@poa.st", &data).await?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue