diff options
author | Vitaly Takmazov | 2017-10-24 17:18:29 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-10-24 22:34:41 +0300 |
commit | de2cc2db73a5de42d9bfaeb92604f28abe2a328a (patch) | |
tree | 352a3d76fcbc987f068527ff043174308a666654 /juick-api/src/test/java/com/juick | |
parent | 881a546bf7a56550eec1e38ce839f47a1cb1a750 (diff) |
crosspost: refactoring
* spring-social
* get tokens via service api
Diffstat (limited to 'juick-api/src/test/java/com/juick')
-rw-r--r-- | juick-api/src/test/java/com/juick/api/tests/MessagesTests.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/juick-api/src/test/java/com/juick/api/tests/MessagesTests.java b/juick-api/src/test/java/com/juick/api/tests/MessagesTests.java index b626b0e9..906e8713 100644 --- a/juick-api/src/test/java/com/juick/api/tests/MessagesTests.java +++ b/juick-api/src/test/java/com/juick/api/tests/MessagesTests.java @@ -19,7 +19,7 @@ package com.juick.api.tests; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; -import com.juick.DeviceRegistration; +import com.juick.ExternalToken; import com.juick.Message; import com.juick.Tag; import com.juick.User; @@ -247,7 +247,7 @@ public class MessagesTests extends AbstractJUnit4SpringContextTests { String juickPassword = "demo"; int juickId = userService.createUser(juickName, juickPassword); String token = "123456"; - DeviceRegistration registration = new DeviceRegistration("apns", token); + ExternalToken registration = new ExternalToken(null, "apns", token, null); mockMvc.perform(put("/notifications").with(httpBasic(ugnichName, ugnichPassword)) .contentType(MediaType.APPLICATION_JSON_UTF8) .content(jsonMapper.writeValueAsBytes(Collections.singletonList(registration)))) @@ -260,6 +260,6 @@ public class MessagesTests extends AbstractJUnit4SpringContextTests { List<User> user = jsonMapper.readValue(result.getResponse().getContentAsString(), new TypeReference<List<User>>() { }); - assertThat(user.get(0).getDevices().get(0).getToken(), equalTo(token)); + assertThat(user.get(0).getTokens().get(0).getToken(), equalTo(token)); } } |