Package org.appfuse.webapp.pages

Source Code of org.appfuse.webapp.pages.PasswordRecoveryTokenTest

package org.appfuse.webapp.pages;

import org.apache.tapestry5.dom.Document;
import org.apache.tapestry5.dom.Element;
import org.apache.tapestry5.func.Predicate;
import org.junit.Test;
import org.subethamail.wiser.Wiser;

import static org.junit.Assert.assertTrue;

public class PasswordRecoveryTokenTest extends BasePageTestCase {

    @Test
    public void testActivate() throws Exception {
        // start SMTP Server
        Wiser wiser = new Wiser();
        wiser.setPort(getSmtpPort());
        wiser.start();

        doc = tester.renderPage("passwordRecoveryToken/admin");

        // verify an account information e-mail was sent
        wiser.stop();
        assertTrue(wiser.getMessages().size() == 1);

        assertTextPresent(doc, "A password reset link was sent to your registered email address.");
    }

}
TOP

Related Classes of org.appfuse.webapp.pages.PasswordRecoveryTokenTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.