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