diff options
Diffstat (limited to 'gentoobrowse-api/unittests/testUsers.cpp')
-rw-r--r-- | gentoobrowse-api/unittests/testUsers.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gentoobrowse-api/unittests/testUsers.cpp b/gentoobrowse-api/unittests/testUsers.cpp index c3380ed..0c8683e 100644 --- a/gentoobrowse-api/unittests/testUsers.cpp +++ b/gentoobrowse-api/unittests/testUsers.cpp @@ -113,6 +113,17 @@ BOOST_AUTO_TEST_CASE( createAgain ) BOOST_REQUIRE_EQUAL(36, user->verifyguid.length()); } +BOOST_AUTO_TEST_CASE( prune ) +{ + BOOST_REQUIRE(u->get(1)); // Verified + BOOST_REQUIRE(u->getNew("dontverify", "p@55w0rd")); // Old, not verified + BOOST_REQUIRE(u->getNew("testuser", "testpass")); // New, not verified + u->prune(); + BOOST_REQUIRE(u->get(1)); // Not deleted, verified + BOOST_REQUIRE_THROW(u->getNew("dontverify", "p@55w0rd"), Slicer::NoRowsReturned); // Delete; Old, not verified + BOOST_REQUIRE(u->getNew("testuser", "testpass")); // Not delete; New, not verified +} + BOOST_AUTO_TEST_CASE( verify ) { auto user = u->getNew("testuser", "testpass"); |