summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2019-01-23 04:56:43 +0000
committerRobin Krahl <robin.krahl@ireas.org>2019-01-23 05:57:11 +0100
commit35fd6be074cd16796f701770845ade471e2c13bd (patch)
tree96087f102b5295f08f71507ab1eed2ce4c8cf808 /tests
parentb00bbaa5603504597729ed2ce0d1e8ff50ea078d (diff)
downloadnitrokey-rs-35fd6be074cd16796f701770845ade471e2c13bd.tar.gz
nitrokey-rs-35fd6be074cd16796f701770845ade471e2c13bd.tar.bz2
Refactor device::config test case
Diffstat (limited to 'tests')
-rw-r--r--tests/device.rs10
1 files changed, 4 insertions, 6 deletions
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]