diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2018-06-19 23:19:06 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2018-06-19 23:19:06 +0200 |
commit | 49413927e68189aa91199f429675487e86231636 (patch) | |
tree | 0a599e71efe03de35a06009280dc8247452c255b /unittest | |
parent | 5910ec72e0f7abd3f6c876e04a07057b0dd8edaa (diff) | |
download | libnitrokey-49413927e68189aa91199f429675487e86231636.tar.gz libnitrokey-49413927e68189aa91199f429675487e86231636.tar.bz2 |
Add test
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'unittest')
-rw-r--r-- | unittest/test_offline.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/unittest/test_offline.cc b/unittest/test_offline.cc index 468849e..808c617 100644 --- a/unittest/test_offline.cc +++ b/unittest/test_offline.cc @@ -160,3 +160,18 @@ TEST_CASE("Test device commands ids", "[fast]") { REQUIRE(STICK20_CMD_CHANGE_UPDATE_PIN == static_cast<uint8_t>(CommandID::CHANGE_UPDATE_PIN)); } + + +TEST_CASE("Connect should not return true after second attempt", "[fast]") { + int result = 0; + + result = NK_login("S"); + REQUIRE(result == 0); + + result = NK_login_auto(); + REQUIRE(result == 0); + + result = NK_logout(); + REQUIRE(result == 0); + +} |