package it.com.atlassian.stash;

import com.atlassian.bitbucket.test.MailServerConfigHelper;
import com.atlassian.webdriver.bitbucket.page.UserPasswordResetPage;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;

import static org.junit.Assert.assertTrue;

public class UserPasswordResetNoMailConfigTest extends BaseBrowserFuncTest {


    @BeforeClass
    @AfterClass
    public static void resetMailConfig() throws Exception {
        MailServerConfigHelper.deleteConfig();
    }

    @Test
    public void testNoMailConfig() throws Exception {
        final UserPasswordResetPage page = BITBUCKET.visit(UserPasswordResetPage.class);
        assertTrue("no error message whereas the mail host is not configured", page.hasNoMailConfigError());
    }

}
