Skip to content

Commit

Permalink
Add more kwejk controller tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pr0gramista committed Apr 8, 2018
1 parent 2a0f69d commit ce28305
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,21 @@ public void shouldReturnJson() throws Exception {
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))
.andExpect(jsonPath("nextPage", matchesPattern(URLUtils.CUT_URL_PATTERN)));
mockMvc.perform(get("/kwejk/245000"))
.andDo(print())
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8));
}

@Test
public void shouldReturnEmptyPage() throws Exception {
mockMvc.perform(get("/kwejk/page/-1"))
.andExpect(status().isNotFound());
}

@Test
public void shouldReturnNoMeme() throws Exception {
mockMvc.perform(get("/kwejk/-1"))
.andExpect(status().isNotFound());
}
}

0 comments on commit ce28305

Please sign in to comment.