aboutsummaryrefslogtreecommitdiff
path: root/src/tests/reset.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/reset.rs')
-rw-r--r--src/tests/reset.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tests/reset.rs b/src/tests/reset.rs
index bf1e75b..9934284 100644
--- a/src/tests/reset.rs
+++ b/src/tests/reset.rs
@@ -11,10 +11,9 @@ use super::*;
#[test_device]
fn reset(model: nitrokey::Model) -> anyhow::Result<()> {
let new_admin_pin = "87654321";
- let mut ncli = Nitrocli::with_model(model);
+ let mut ncli = Nitrocli::new().model(model).new_admin_pin(new_admin_pin);
// Change the admin PIN.
- ncli.new_admin_pin(new_admin_pin);
let _ = ncli.handle(&["pin", "set", "admin"])?;
{
@@ -25,7 +24,7 @@ fn reset(model: nitrokey::Model) -> anyhow::Result<()> {
}
// Perform factory reset
- ncli.admin_pin(new_admin_pin);
+ let mut ncli = ncli.admin_pin(new_admin_pin);
let out = ncli.handle(&["reset"])?;
assert!(out.is_empty());