From 49413927e68189aa91199f429675487e86231636 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Tue, 19 Jun 2018 23:19:06 +0200 Subject: Add test Signed-off-by: Szczepan Zalega --- unittest/test_offline.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'unittest') 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(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); + +} -- cgit v1.2.1