diff options
Diffstat (limited to 'gentoobrowse-api/unittests/testUsers.cpp')
-rw-r--r-- | gentoobrowse-api/unittests/testUsers.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gentoobrowse-api/unittests/testUsers.cpp b/gentoobrowse-api/unittests/testUsers.cpp index 0c8683e..e3fb3c9 100644 --- a/gentoobrowse-api/unittests/testUsers.cpp +++ b/gentoobrowse-api/unittests/testUsers.cpp @@ -2,6 +2,7 @@ #include <boost/test/unit_test.hpp> #include "mockDefs.h" +#include <mockMailServer.h> BOOST_GLOBAL_FIXTURE( Service ); @@ -43,7 +44,9 @@ BOOST_AUTO_TEST_CASE( authenticateVerify ) BOOST_AUTO_TEST_CASE( create ) { - auto ms = getProxy<Gentoo::MockMailServerPrx>("mailserver"); + auto ms1 = IceTray::Cube::get<IceTray::Mail::MailServer>(); + BOOST_REQUIRE(ms1); + auto ms = std::dynamic_pointer_cast<IceTray::Mail::MockMailServer>(ms1); BOOST_REQUIRE(ms); auto user = u->create("testuser", "testpass", "Test User", "test@user.com"); BOOST_REQUIRE_EQUAL(1, ms->getSentEmails().size()); @@ -103,7 +106,7 @@ BOOST_AUTO_TEST_CASE( createAgain ) * * return original user * * resend verification */ - auto ms = getProxy<Gentoo::MockMailServerPrx>("mailserver"); + auto ms = std::dynamic_pointer_cast<IceTray::Mail::MockMailServerImpl>(this->ms); BOOST_REQUIRE(ms); auto user = u->create("testuser", "testpass", "Test User", "recreate@user.com"); BOOST_REQUIRE_EQUAL(2, ms->getSentEmails().size()); |