Skip to content

Commit

Permalink
Add test for unsuspension of credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
UMR1352 committed Jan 26, 2024
1 parent 3f14c34 commit 486342c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions identity_credential/src/revocation/status_list_2021/credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,4 +428,16 @@ mod tests {
Err(StatusList2021CredentialError::UnrevocableCredential)
);
}
#[test]
fn suspended_credential_can_be_unsuspended() {
let url = Url::parse("http://example.com").unwrap();
let mut status_list_credential = StatusList2021CredentialBuilder::new(StatusList2021::default())
.issuer(Issuer::Url(url.clone()))
.purpose(StatusPurpose::Suspension)
.subject_id(url)
.build()
.unwrap();

assert!(status_list_credential.set_entry(420, false).is_ok());
}
}

0 comments on commit 486342c

Please sign in to comment.