Fix tests (#71)
This commit is contained in:
parent
af92e0d532
commit
988450c79f
3 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||
```
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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>,
|
||||
|
|
Loading…
Reference in a new issue