Merge branch 'BAEL-3283-latest' into BAEL-3283

This commit is contained in:
sandip singh
2019-10-31 23:25:14 +05:30
parent db85c8f275
commit f6c3f9ebcb
20562 changed files with 1643286 additions and 0 deletions
@@ -0,0 +1,31 @@
package app.controllers;
import org.javalite.activeweb.ControllerSpec;
import org.junit.Before;
import org.junit.Test;
import com.google.inject.Guice;
import app.services.ArticleServiceModule;
public class ArticleControllerSpec extends ControllerSpec {
@Before
public void before() {
setInjector(Guice.createInjector(new ArticleServiceModule()));
}
@Test
public void whenReturnedArticlesThenCorrect() {
request().get("index");
a(responseContent()).shouldContain("<td>Introduction to Mule</td>");
}
@Test
public void givenKeywordWhenFoundArticleThenCorrect() {
request().param("key", "Java")
.get("search");
a(responseContent()).shouldContain("<td>Article with Java</td>");
}
}