diff options
Diffstat (limited to 'src/tests/otp.rs')
-rw-r--r-- | src/tests/otp.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/tests/otp.rs b/src/tests/otp.rs index 8802d9e..7361688 100644 --- a/src/tests/otp.rs +++ b/src/tests/otp.rs @@ -121,12 +121,11 @@ fn clear(model: nitrokey::Model) -> crate::Result<()> { let _ = ncli.handle(&["otp", "clear", "3"])?; let res = ncli.handle(&["otp", "get", "3"]); - assert_eq!( - res.unwrap_cmd_err(), - ( - Some("Could not generate OTP"), - nitrokey::CommandError::SlotNotProgrammed - ) + let err = res.unwrap_err().to_string(); + let expected = format!( + "Could not generate OTP: {}", + nitrokey::Error::CommandError(nitrokey::CommandError::SlotNotProgrammed) ); + assert_eq!(err, expected); Ok(()) } |