aboutsummaryrefslogtreecommitdiff
path: root/src/tests/reset.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2020-08-24 18:04:20 -0700
committerDaniel Mueller <deso@posteo.net>2020-08-24 18:04:20 -0700
commitb114125dfbb4c97580ae076c07c6816ccdca51b8 (patch)
treea6663810c402dbd4f99f07e485872dd5f80702bf /src/tests/reset.rs
parent147d01663f9b95c6819d3c6afe8694cd291dbc3d (diff)
downloadnitrocli-b114125dfbb4c97580ae076c07c6816ccdca51b8.tar.gz
nitrocli-b114125dfbb4c97580ae076c07c6816ccdca51b8.tar.bz2
Introduce builder infrastructure for assembling Nitrocli instance
In the future we would like to provide more ways for tests to create a Nitrocli instance. In order to prevent explosion of with_XXX methods for each possible combination of arguments, this change introduces a Builder struct that can be used to create such an instance in an idiomatic way.
Diffstat (limited to 'src/tests/reset.rs')
-rw-r--r--src/tests/reset.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/reset.rs b/src/tests/reset.rs
index e197970..23137bf 100644
--- a/src/tests/reset.rs
+++ b/src/tests/reset.rs
@@ -25,7 +25,7 @@ use super::*;
#[test_device]
fn reset(model: nitrokey::Model) -> crate::Result<()> {
let new_admin_pin = "87654321";
- let mut ncli = Nitrocli::with_model(model);
+ let mut ncli = Nitrocli::make().model(model).build();
// Change the admin PIN.
ncli.new_admin_pin(new_admin_pin);