Skip to content

Commit

Permalink
Add revoked recipient to shamir client test
Browse files Browse the repository at this point in the history
  • Loading branch information
vxgmichel committed Dec 9, 2024
1 parent 27669a7 commit 63b59c6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion libparsec/crates/client/tests/unit/invite/shamir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ async fn shamir(tmp_path: TmpPath, env: &TestbedEnv) {
let mallory = env.local_device("mallory@dev1");
let mike = env.local_device("mike@dev1");

// Revoke Mallory first
let alice_client = client_factory(&env.discriminant_dir, alice.clone()).await;
alice_client.revoke_user(mallory.user_id).await.unwrap();
let mallory_revoked_on = alice_client
.list_users(false, None, None)
.await
.unwrap()
.iter()
.find(|&u| u.id == mallory.user_id)
.unwrap()
.revoked_on;

let alice_token = env
.template
.events
Expand Down Expand Up @@ -68,7 +80,7 @@ async fn shamir(tmp_path: TmpPath, env: &TestbedEnv) {
user_id: mallory.user_id,
human_handle: mallory.human_handle.clone(),
shares: 1.try_into().unwrap(),
revoked_on: None,
revoked_on: mallory_revoked_on,
},
ShamirRecoveryRecipient {
user_id: mike.user_id,
Expand Down

0 comments on commit 63b59c6

Please sign in to comment.