diff options
author | Vitaly Takmazov | 2024-10-17 06:17:31 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2024-10-17 17:05:17 +0300 |
commit | 65baf5066433d6a52e30fbd6e7b32c4741ec0d55 (patch) | |
tree | a0fd5989db4b11a7f4c527fb2bb58002dfa1b476 /src/test/java/com/juick | |
parent | 5ab2f6aa9ae409e485d9106e8bff411c30602462 (diff) |
`User::getLanguage`
Diffstat (limited to 'src/test/java/com/juick')
-rw-r--r-- | src/test/java/com/juick/server/tests/ServerTests.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index d0f4032a..eb467ad6 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -288,6 +288,10 @@ public class ServerTests { .orElseThrow(IllegalStateException::new); ugnich = makeUserVerified(ugnich); freefd = makeUserVerified(freefd); + assertThat(ugnich.getLanguage(), is("__")); + ugnich.setLanguage("en"); + userService.updateLanguage(ugnich); + assertThat(ugnich.getLanguage(), is("en")); webClient.getOptions().setJavaScriptEnabled(false); webClient.getOptions().setCssEnabled(false); isSetUp = true; @@ -1524,8 +1528,8 @@ public class ServerTests { jsonMapper.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT); String jsonUser = jsonMapper.writeValueAsString(yyy); Map<String, Object> user = JsonPath.read(jsonUser, "$"); - // only uid, name and uri - assertThat(user.keySet().size(), is(3)); + // only uid, name, lang and uri + assertThat(user.keySet().size(), is(4)); JAXBContext context = JAXBContext.newInstance(User.class); Marshaller m = context.createMarshaller(); |