diff options
Diffstat (limited to 'gentoobrowse-api/unittests/testUsers.cpp')
-rw-r--r-- | gentoobrowse-api/unittests/testUsers.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gentoobrowse-api/unittests/testUsers.cpp b/gentoobrowse-api/unittests/testUsers.cpp index 7eb0ba3..c3380ed 100644 --- a/gentoobrowse-api/unittests/testUsers.cpp +++ b/gentoobrowse-api/unittests/testUsers.cpp @@ -50,7 +50,7 @@ BOOST_AUTO_TEST_CASE( create ) BOOST_REQUIRE_EQUAL("Gentoo Browse: Welcome", ms->getSentEmails().front()->subject); BOOST_REQUIRE_EQUAL("test@user.com", ms->getSentEmails().front()->to.address); BOOST_REQUIRE_EQUAL("Test User", ms->getSentEmails().front()->to.name); - BOOST_REQUIRE_EQUAL(3, user->userid); + BOOST_REQUIRE_EQUAL(4, user->userid); BOOST_REQUIRE_EQUAL("testuser", user->username); BOOST_REQUIRE_EQUAL("Test User", user->userrealname); BOOST_REQUIRE_EQUAL("test@user.com", user->useremail); @@ -74,14 +74,14 @@ BOOST_AUTO_TEST_CASE( get ) BOOST_AUTO_TEST_CASE( getNotVerified ) { // Is not verified, doesn't exist - BOOST_REQUIRE_THROW(u->get(3), Slicer::NoRowsReturned); + BOOST_REQUIRE_THROW(u->get(4), Slicer::NoRowsReturned); } BOOST_AUTO_TEST_CASE( getNew ) { auto user = u->getNew("testuser", "testpass"); BOOST_REQUIRE(user); - BOOST_REQUIRE_EQUAL(3, user->userid); + BOOST_REQUIRE_EQUAL(4, user->userid); BOOST_REQUIRE_EQUAL("testuser", user->username); BOOST_REQUIRE_EQUAL("Test User", user->userrealname); BOOST_REQUIRE_EQUAL("test@user.com", user->useremail); @@ -109,7 +109,7 @@ BOOST_AUTO_TEST_CASE( createAgain ) BOOST_REQUIRE_EQUAL(2, ms->getSentEmails().size()); BOOST_REQUIRE_EQUAL("Gentoo Browse: Welcome", ms->getSentEmails()[1]->subject); BOOST_REQUIRE_EQUAL("test@user.com", ms->getSentEmails()[1]->to.address); - BOOST_REQUIRE_EQUAL(3, user->userid); + BOOST_REQUIRE_EQUAL(4, user->userid); BOOST_REQUIRE_EQUAL(36, user->verifyguid.length()); } @@ -120,18 +120,18 @@ BOOST_AUTO_TEST_CASE( verify ) auto verified = u->verify(user->username, user->verifyguid); BOOST_REQUIRE(verified); BOOST_REQUIRE_THROW(u->getNew("testuser", "testpass"), Slicer::NoRowsReturned); - BOOST_REQUIRE(u->get(3)); + BOOST_REQUIRE(u->get(4)); } BOOST_AUTO_TEST_CASE( sendmailshot ) { - auto user = u->get(3); + auto user = u->get(4); BOOST_REQUIRE(user); BOOST_REQUIRE(!user->lastmailshot); - u->mailshotsent(3); - user = u->get(3); + u->mailshotsent(4); + user = u->get(4); BOOST_REQUIRE(user); - BOOST_REQUIRE_EQUAL(3, user->userid); + BOOST_REQUIRE_EQUAL(4, user->userid); BOOST_REQUIRE_EQUAL("testuser", user->username); BOOST_REQUIRE_EQUAL("Test User", user->userrealname); BOOST_REQUIRE_EQUAL("test@user.com", user->useremail); @@ -148,7 +148,7 @@ BOOST_AUTO_TEST_CASE( getMissing ) BOOST_AUTO_TEST_CASE( find ) { auto user = u->find("testuser"); - BOOST_REQUIRE_EQUAL(3, user->userid); + BOOST_REQUIRE_EQUAL(4, user->userid); BOOST_REQUIRE_EQUAL("testuser", user->username); BOOST_REQUIRE_EQUAL("Test User", user->userrealname); BOOST_REQUIRE_EQUAL("test@user.com", user->useremail); @@ -161,11 +161,11 @@ BOOST_AUTO_TEST_CASE( findMissing ) BOOST_AUTO_TEST_CASE( deleteCheck ) { - u->get(3); + u->get(4); u->remove(3, "wrongpass"); - u->get(3); - u->remove(3, "testpass"); - BOOST_REQUIRE_THROW(u->get(3), Slicer::NoRowsReturned); + u->get(4); + u->remove(4, "testpass"); + BOOST_REQUIRE_THROW(u->get(4), Slicer::NoRowsReturned); } BOOST_AUTO_TEST_CASE( track ) |