Skip to content

Commit

Permalink
chore: Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 committed Oct 21, 2023
1 parent 0370da1 commit c7f79f7
Show file tree
Hide file tree
Showing 2 changed files with 419 additions and 1 deletion.
25 changes: 24 additions & 1 deletion extensions/warp-ipfs/tests/accounts.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
pub mod common;

#[cfg(test)]
mod test {
use std::time::Duration;

use crate::common::{create_account, create_accounts};
use crate::common::{self, create_account, create_accounts};
use warp::constellation::file::FileType;
use warp::multipass::identity::{IdentityStatus, IdentityUpdate, Platform};
use warp::tesseract::Tesseract;
Expand Down Expand Up @@ -270,6 +271,28 @@ mod test {
Ok(())
}

#[tokio::test]
async fn identity_real_profile_picture() -> anyhow::Result<()> {
let (mut account, did, _) = create_account(
Some("JohnDoe"),
None,
Some("test::identity_real_profile_picture".into()),
)
.await?;

account
.update_identity(IdentityUpdate::Picture(common::PROFILE_IMAGE.into()))
.await?;

let image = account.identity_picture(&did).await?;

assert_eq!(image.data(), common::PROFILE_IMAGE);
assert!(image
.image_type()
.eq(&FileType::Mime("image/png".parse().unwrap())));
Ok(())
}

#[tokio::test]
async fn identity_profile_picture() -> anyhow::Result<()> {
let (mut account, did, _) = create_account(
Expand Down
Loading

0 comments on commit c7f79f7

Please sign in to comment.