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.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/gentoobrowse-api/unittests/testUsers.cpp b/gentoobrowse-api/unittests/testUsers.cpp
index e515b77..7f9eaee 100644
--- a/gentoobrowse-api/unittests/testUsers.cpp
+++ b/gentoobrowse-api/unittests/testUsers.cpp
@@ -43,7 +43,13 @@ BOOST_AUTO_TEST_CASE( authenticateVerify )
BOOST_AUTO_TEST_CASE( create )
{
+ auto ms = getProxy<Gentoo::MockMailServerPrx>("mailserver");
+ BOOST_REQUIRE(ms);
auto user = u->create("testuser", "testpass", "Test User", "test@user.com");
+ BOOST_REQUIRE_EQUAL(1, ms->getSentEmails().size());
+ 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("testuser", user->username);
BOOST_REQUIRE_EQUAL("Test User", user->userrealname);