Skip to content
Snippets Groups Projects
Commit 41c0b0a8 authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Adjust tests

parent 1f3bd6bb
1 merge request!52Improve exception handling
Pipeline #8111 passed with stages
in 3 minutes and 29 seconds
...@@ -89,15 +89,15 @@ public class CourseControllerTest { ...@@ -89,15 +89,15 @@ public class CourseControllerTest {
public void testShouldIndicateNotImplementedIfInactiveClient() throws Exception { public void testShouldIndicateNotImplementedIfInactiveClient() throws Exception {
setAuthenticated(true, "ptsr00"); setAuthenticated(true, "ptsr00");
mockMvc.perform(get("/mycourses").accept(MediaType.TEXT_PLAIN)) mockMvc.perform(get("/mycourses").accept(MediaType.APPLICATION_JSON))
.andExpect(status().isNotImplemented()); .andExpect(status().isNotImplemented());
} }
@Test @Test
public void testShouldNotReturnCurrentUsersCoursesIfUnauthorized() throws Exception { public void testShouldNotReturnCurrentUsersCoursesIfUnauthorized() throws Exception {
setAuthenticated(false, "nobody"); setAuthenticated(false, "nobody");
mockMvc.perform(get("/mycourses").accept(MediaType.TEXT_PLAIN)) mockMvc.perform(get("/mycourses").accept(MediaType.APPLICATION_JSON))
.andExpect(status().isUnauthorized()); .andExpect(status().isUnauthorized());
} }
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment