Skip to content

Commit

Permalink
adding test to check verify_issue_bundle failure on asset base being …
Browse files Browse the repository at this point in the history
…set as identity point
  • Loading branch information
vivek-arte committed Jun 19, 2023
1 parent 1c6c2bf commit 28aad75
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/issuance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1358,6 +1358,27 @@ mod tests {
);
}

#[test]
fn issue_bundle_verify_fail_asset_base_identity_point() {
let (mut rng, isk, ik, _, bundle, sighash) =
identity_point_asset_base_test_params(10, 20, false);

let signed = IssueBundle {
ik,
actions: bundle.actions,
authorization: Signed {
signature: isk.sign(&mut rng, &sighash),
},
};

let prev_finalized = HashSet::new();

assert_eq!(
verify_issue_bundle(&signed, sighash, &prev_finalized).unwrap_err(),
AssetBaseCannotBeIdentityPoint
);
}

#[test]
fn test_finalize_flag_serialization() {
let mut rng = OsRng;
Expand Down

0 comments on commit 28aad75

Please sign in to comment.