Fix tests

This commit is contained in:
Felix Ableitner 2023-07-18 22:03:21 +02:00
parent af92e0d532
commit af5333a6d9
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>,