aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO.md1
-rw-r--r--tests/device.rs10
2 files changed, 4 insertions, 7 deletions
diff --git a/TODO.md b/TODO.md
index 49e4e08..d3f0018 100644
--- a/TODO.md
+++ b/TODO.md
@@ -7,7 +7,6 @@
- `NK_connect_with_ID`
- Fix timing issues with the `totp_no_pin` and `totp_pin` test cases.
- Clear passwords from memory.
-- Find a nicer syntax for the `write_config` test.
- Lock password safe in `PasswordSafe::drop()` (see [nitrokey-storage-firmware
issue 65][]).
- Disable creation of multiple password safes at the same time.
diff --git a/tests/device.rs b/tests/device.rs
index 0431f8b..59c9348 100644
--- a/tests/device.rs
+++ b/tests/device.rs
@@ -133,23 +133,21 @@ fn get_retry_count(device: DeviceWrapper) {
#[test_device]
fn config(device: DeviceWrapper) {
let admin = device.authenticate_admin(ADMIN_PASSWORD).unwrap();
+
let config = Config::new(None, None, None, true);
assert_ok!((), admin.write_config(config));
- let get_config = admin.get_config().unwrap();
- assert_eq!(config, get_config);
+ assert_ok!(config, admin.get_config());
let config = Config::new(None, Some(9), None, true);
assert_lib_err!(LibraryError::InvalidSlot, admin.write_config(config));
let config = Config::new(Some(1), None, Some(0), false);
assert_ok!((), admin.write_config(config));
- let get_config = admin.get_config().unwrap();
- assert_eq!(config, get_config);
+ assert_ok!(config, admin.get_config());
let config = Config::new(None, None, None, false);
assert_ok!((), admin.write_config(config));
- let get_config = admin.get_config().unwrap();
- assert_eq!(config, get_config);
+ assert_ok!(config, admin.get_config());
}
#[test_device]