aboutsummaryrefslogtreecommitdiff
path: root/src/tests/status.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/status.rs')
-rw-r--r--src/tests/status.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/tests/status.rs b/src/tests/status.rs
index d158103..7946929 100644
--- a/src/tests/status.rs
+++ b/src/tests/status.rs
@@ -11,12 +11,7 @@ fn not_found_raw() {
assert_ne!(rc, 0);
assert_eq!(out, b"");
- let expected = r#"Nitrokey device not found
-
-Caused by:
- Communication error: Could not connect to a Nitrokey device
-"#;
- assert_eq!(err, expected.as_bytes());
+ assert_eq!(err, b"Nitrokey device not found\n");
}
#[test_device]
@@ -26,6 +21,13 @@ fn not_found() {
assert_eq!(err, "Nitrokey device not found");
}
+#[test_device]
+fn not_found_pro() {
+ let res = Nitrocli::new().handle(&["status", "--model=pro"]);
+ let err = res.unwrap_err().to_string();
+ assert_eq!(err, "Nitrokey device not found (filter: model=pro)");
+}
+
#[test_device(pro)]
fn output_pro(model: nitrokey::Model) -> anyhow::Result<()> {
let re = regex::Regex::new(