Fix tests (#71)

This commit is contained in:
Nutomic 2023-07-18 22:10:25 +02:00 committed by GitHub
parent af92e0d532
commit 988450c79f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View file

@ -34,7 +34,7 @@ We can similarly dereference a user over webfinger with the following method. It
# tokio::runtime::Runtime::new().unwrap().block_on(async {
# let config = FederationConfig::builder().domain("example.com").app_data(db_connection).build().await?;
# let data = config.to_request_data();
let user: DbUser = webfinger_resolve_actor("nutomic@lemmy.ml", &data).await?;
let user: DbUser = webfinger_resolve_actor("ruud@lemmy.world", &data).await?;
# Ok::<(), anyhow::Error>(())
# }).unwrap();
```

View file

@ -13,6 +13,7 @@ It is sometimes necessary to fetch from a URL, but we don't know the exact type
# use url::Url;
# use activitypub_federation::traits::tests::{Person, Note};
#[derive(Debug)]
pub enum SearchableDbObjects {
User(DbUser),
Post(DbPost)

View file

@ -22,6 +22,7 @@ use url::Url;
/// # use activitypub_federation::traits::tests::{DbConnection, DbUser};
/// #
/// /// How the post is read/written in the local database
/// #[derive(Debug)]
/// pub struct DbPost {
/// pub text: String,
/// pub ap_id: ObjectId<DbPost>,