summaryrefslogtreecommitdiff
path: root/src/tests/otp.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2020-07-09 19:01:52 -0700
committerDaniel Mueller <deso@posteo.net>2020-07-09 19:01:52 -0700
commit756dc2ed9d16a3edbfdc4778feb11f0b0c84d897 (patch)
treeb1d9c02a9065236502b639e241733d91b2fe9a94 /src/tests/otp.rs
parentc461a506f6bf3bf73374df289298879ba9d2d125 (diff)
downloadnitrocli-756dc2ed9d16a3edbfdc4778feb11f0b0c84d897.tar.gz
nitrocli-756dc2ed9d16a3edbfdc4778feb11f0b0c84d897.tar.bz2
Remove UnwrapError test trait
This change wraps up the removal of the UnwrapError test trait. This step prepares us for the subsequent removal of the application's global Error enum type, in favor of the usage of anyhow's Error type.
Diffstat (limited to 'src/tests/otp.rs')
-rw-r--r--src/tests/otp.rs11
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(())
}