aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2018-05-20 23:06:17 +0000
committerRobin Krahl <me@robin-krahl.de>2018-05-21 01:07:10 +0200
commit68f1f31595757c5018c5c243a76e94e0af5439ef (patch)
tree977d857843362ae50de0d2b51de541c4528ad737 /src/tests
parent98eaf71502afeb4f14eb4f7bc365e3211b5709fb (diff)
downloadnitrokey-rs-68f1f31595757c5018c5c243a76e94e0af5439ef.tar.gz
nitrokey-rs-68f1f31595757c5018c5c243a76e94e0af5439ef.tar.bz2
Add get_minor_firmware_version to Device
Since libnitrokey v3.3, we can also access the minor firmware version.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/pro.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tests/pro.rs b/src/tests/pro.rs
index dee7dc6..76d68a0 100644
--- a/src/tests/pro.rs
+++ b/src/tests/pro.rs
@@ -194,9 +194,12 @@ fn totp_slot_name() {
#[test]
#[cfg_attr(not(feature = "test-pro"), ignore)]
-fn get_major_firmware_version() {
+fn get_firmware_version() {
set_debug(false);
- assert_eq!(0, ::connect().unwrap().get_major_firmware_version());
+ let device = ::connect().unwrap();
+ assert_eq!(0, device.get_major_firmware_version());
+ let minor = device.get_minor_firmware_version();
+ assert!(minor == 7 || minor == 8);
}
fn admin_retry(device: UnauthenticatedDevice, suffix: &str, count: u8) -> UnauthenticatedDevice {