fix AuthControllerIntegrationTest

This commit is contained in:
dartpopikyardo
2016-09-27 16:14:21 +03:00
parent 4b74d2c1f1
commit 68a1269088

View File

@@ -58,7 +58,7 @@ public class AuthControllerIntegrationTest {
when(customerAuthService.findByEmailAndPassword("my@email.com", "my_password")).thenReturn(new QuerySideCustomer("id", new Name("test", "test"), "my@email.com", "my_password", "ssn", "", new Address(), null));
when(customerAuthService.findByEmailAndPassword("not_my@email.com", "not_my_password")).thenThrow(new EmptyResultDataAccessException(1));
when(tokenService.allocateToken(om.writeValueAsString(new User("my@email.com\"}")))).thenReturn(new DefaultToken("key", System.currentTimeMillis(), ""));
when(tokenService.allocateToken(om.writeValueAsString(new User("my@email.com")))).thenReturn(new DefaultToken("key", System.currentTimeMillis(), ""));
mockMvc.perform(post("/api/login")
.contentType(MediaType.APPLICATION_JSON)