summaryrefslogtreecommitdiff
path: root/nitrocli/src/tests/status.rs
diff options
context:
space:
mode:
Diffstat (limited to 'nitrocli/src/tests/status.rs')
-rw-r--r--nitrocli/src/tests/status.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/nitrocli/src/tests/status.rs b/nitrocli/src/tests/status.rs
index 838ebc9..acd33dc 100644
--- a/nitrocli/src/tests/status.rs
+++ b/nitrocli/src/tests/status.rs
@@ -18,13 +18,12 @@
// *************************************************************************
use super::*;
-use crate::tests::nitrocli;
// This test acts as verification that conversion of Error::Error
// variants into the proper exit code works properly.
#[test_device]
fn not_found_raw() {
- let (rc, out, err) = nitrocli::run(NO_DEV, &["status"]);
+ let (rc, out, err) = Nitrocli::new().run(&["status"]);
assert_ne!(rc, 0);
assert_eq!(out, b"");
@@ -33,7 +32,7 @@ fn not_found_raw() {
#[test_device]
fn not_found() {
- let res = nitrocli::handle(NO_DEV, &["status"]);
+ let res = Nitrocli::new().handle(&["status"]);
assert_eq!(res.unwrap_str_err(), "Nitrokey device not found");
}
@@ -50,7 +49,7 @@ $"#,
)
.unwrap();
- let out = nitrocli::handle(Some(device), &["status"])?;
+ let out = Nitrocli::with_dev(device).handle(&["status"])?;
assert!(re.is_match(&out), out);
Ok(())
}