aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/status.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tests/status.rs b/src/tests/status.rs
index 7946929..268e36f 100644
--- a/src/tests/status.rs
+++ b/src/tests/status.rs
@@ -28,6 +28,16 @@ fn not_found_pro() {
assert_eq!(err, "Nitrokey device not found (filter: model=pro)");
}
+#[test_device]
+fn not_found_by_serial_number() {
+ let res = Nitrocli::new().handle(&["status", "--model=storage", "--serial-number=deadbeef"]);
+ let err = res.unwrap_err().to_string();
+ assert_eq!(
+ err,
+ "Nitrokey device not found (filter: model=storage, serial number in [0xdeadbeef])"
+ );
+}
+
#[test_device(pro)]
fn output_pro(model: nitrokey::Model) -> anyhow::Result<()> {
let re = regex::Regex::new(