Changed token response in controller

This commit is contained in:
Filip Izydorczyk
2020-12-07 21:46:47 +01:00
parent 3061fb1edf
commit f9baed5df7
7 changed files with 52 additions and 52 deletions

View File

@ -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))