summaryrefslogtreecommitdiff
path: root/gentoobrowse-api/unittests/testUsers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gentoobrowse-api/unittests/testUsers.cpp')
-rw-r--r--gentoobrowse-api/unittests/testUsers.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/gentoobrowse-api/unittests/testUsers.cpp b/gentoobrowse-api/unittests/testUsers.cpp
index a4567f3..e515b77 100644
--- a/gentoobrowse-api/unittests/testUsers.cpp
+++ b/gentoobrowse-api/unittests/testUsers.cpp
@@ -48,6 +48,8 @@ BOOST_AUTO_TEST_CASE( create )
BOOST_REQUIRE_EQUAL("testuser", user->username);
BOOST_REQUIRE_EQUAL("Test User", user->userrealname);
BOOST_REQUIRE_EQUAL("test@user.com", user->useremail);
+ BOOST_REQUIRE(user->signedup.length() > 19);
+ BOOST_REQUIRE(!user->lastmailshot);
BOOST_REQUIRE_EQUAL(36, user->verifyguid.length());
auto verified = u->verify(user->username, user->verifyguid);
BOOST_REQUIRE(verified);
@@ -60,6 +62,25 @@ BOOST_AUTO_TEST_CASE( get )
BOOST_REQUIRE_EQUAL("testuser", user->username);
BOOST_REQUIRE_EQUAL("Test User", user->userrealname);
BOOST_REQUIRE_EQUAL("test@user.com", user->useremail);
+ BOOST_REQUIRE(user->signedup.length() > 19);
+ BOOST_REQUIRE(!user->lastmailshot);
+}
+
+BOOST_AUTO_TEST_CASE( sendmailshot )
+{
+ auto user = u->get(3);
+ BOOST_REQUIRE(user);
+ BOOST_REQUIRE(!user->lastmailshot);
+ u->mailshotsent(3);
+ user = u->get(3);
+ BOOST_REQUIRE(user);
+ BOOST_REQUIRE_EQUAL(3, user->userid);
+ BOOST_REQUIRE_EQUAL("testuser", user->username);
+ BOOST_REQUIRE_EQUAL("Test User", user->userrealname);
+ BOOST_REQUIRE_EQUAL("test@user.com", user->useremail);
+ BOOST_REQUIRE(user->signedup.length() > 19);
+ BOOST_REQUIRE(user->lastmailshot);
+ BOOST_REQUIRE(user->lastmailshot->length() > 19);
}
BOOST_AUTO_TEST_CASE( getMissing )