mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-25 20:51:09 +00:00
Fix test
This commit is contained in:
parent
da2c382cb0
commit
2cf36210ff
1 changed files with 3 additions and 1 deletions
|
@ -3,6 +3,7 @@ extern crate ibis_lib;
|
||||||
mod common;
|
mod common;
|
||||||
|
|
||||||
use crate::common::{TestData, TEST_ARTICLE_DEFAULT_TEXT};
|
use crate::common::{TestData, TEST_ARTICLE_DEFAULT_TEXT};
|
||||||
|
use ibis_lib::common::utils::extract_domain;
|
||||||
use ibis_lib::common::{
|
use ibis_lib::common::{
|
||||||
ArticleView, EditArticleData, ForkArticleData, GetArticleData, GetUserData, ListArticlesData,
|
ArticleView, EditArticleData, ForkArticleData, GetArticleData, GetUserData, ListArticlesData,
|
||||||
};
|
};
|
||||||
|
@ -601,11 +602,12 @@ async fn test_user_profile() -> MyResult<()> {
|
||||||
data.beta
|
data.beta
|
||||||
.resolve_article(create_res.article.ap_id.into_inner())
|
.resolve_article(create_res.article.ap_id.into_inner())
|
||||||
.await?;
|
.await?;
|
||||||
|
let domain = extract_domain(&data.alpha.my_profile().await?.person.ap_id);
|
||||||
|
|
||||||
// Now we can fetch the remote user from local api
|
// Now we can fetch the remote user from local api
|
||||||
let params = GetUserData {
|
let params = GetUserData {
|
||||||
name: "alpha".to_string(),
|
name: "alpha".to_string(),
|
||||||
domain: Some("localhost:8100".to_string()),
|
domain: Some(domain),
|
||||||
};
|
};
|
||||||
let user = data.beta.get_user(params).await?;
|
let user = data.beta.get_user(params).await?;
|
||||||
assert_eq!("alpha", user.username);
|
assert_eq!("alpha", user.username);
|
||||||
|
|
Loading…
Reference in a new issue