summaryrefslogtreecommitdiff
path: root/src/tests/status.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2020-07-08 09:16:56 -0700
committerDaniel Mueller <deso@posteo.net>2020-07-08 09:16:56 -0700
commitefb6fbffdb96c6acd197b8a7c4fe0ed9855a151e (patch)
tree3d0256f65ff317e9d0f41816d2841692e8743cac /src/tests/status.rs
parent99fde3cac7c9cf278b81876994d3a4f4b795b8ce (diff)
downloadnitrocli-efb6fbffdb96c6acd197b8a7c4fe0ed9855a151e.tar.gz
nitrocli-efb6fbffdb96c6acd197b8a7c4fe0ed9855a151e.tar.bz2
Remove unwrap_str_err method from UnwrapError test trait
With upcoming changes we intend to move towards a model where we do not distinguish the individual error variants the program deals with in a global enum. In preparation of such a change, this patch marks a first step in removing the UnwrapError test trait, which relies on the existence of exactly such typed errors. In particular, we remove the unwrap_str_err method from it, basically falling back to just working with strings.
Diffstat (limited to 'src/tests/status.rs')
-rw-r--r--src/tests/status.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tests/status.rs b/src/tests/status.rs
index c9f4976..e80fadc 100644
--- a/src/tests/status.rs
+++ b/src/tests/status.rs
@@ -1,7 +1,7 @@
// status.rs
// *************************************************************************
-// * Copyright (C) 2019 Daniel Mueller (deso@posteo.net) *
+// * Copyright (C) 2019-2020 Daniel Mueller (deso@posteo.net) *
// * *
// * This program is free software: you can redistribute it and/or modify *
// * it under the terms of the GNU General Public License as published by *
@@ -33,7 +33,8 @@ fn not_found_raw() {
#[test_device]
fn not_found() {
let res = Nitrocli::new().handle(&["status"]);
- assert_eq!(res.unwrap_str_err(), "Nitrokey device not found");
+ let err = res.unwrap_err().to_string();
+ assert_eq!(err, "Nitrokey device not found");
}
#[test_device(pro)]