aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/test/java/com/juick/api/tests
diff options
context:
space:
mode:
Diffstat (limited to 'juick-api/src/test/java/com/juick/api/tests')
-rw-r--r--juick-api/src/test/java/com/juick/api/tests/MessagesTests.java6
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));
}
}