package io.mangoo.controllers;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue;
import org.junit.Test;
import io.mangoo.test.utils.WebRequest;
import io.mangoo.test.utils.WebResponse;
import io.undertow.util.StatusCodes;
/**
*
* @author svenkubiak
*
*/
public class FlashControllerTest {
@Test
public void testFlash() {
//given
WebResponse response = WebRequest.get("/flash").execute();
//then
assertThat(response, not(nullValue()));
assertThat(response.getStatusCode(), equalTo(StatusCodes.OK));
assertThat(response.getContent(), equalTo("simpleerrorwarningsuccess"));
}
}