@ -36,8 +36,8 @@ public class AssignmentsControllerTest extends AbstractControllerTest {
|
||||
|
||||
@Test
|
||||
public void shouldReturnOk() throws Exception {
|
||||
this.service.save(new User(null, null, TEST_MAIL, UserRoles.TEST_USER));
|
||||
final String token = this.service.login(TEST_MAIL);
|
||||
final User newuser = this.service.save(new User(null, null, TEST_MAIL, UserRoles.TEST_USER));
|
||||
final String token = this.service.login(newuser);
|
||||
|
||||
MockMvc mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).apply(springSecurity()).build();
|
||||
mockMvc.perform(get(ASSIGFNMENTS_ENDPOINT).header("Authorization", "Bearer " + token))
|
||||
|
Reference in New Issue
Block a user