From 65baf5066433d6a52e30fbd6e7b32c4741ec0d55 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 17 Oct 2024 06:17:31 +0300 Subject: `User::getLanguage` --- src/test/java/com/juick/server/tests/ServerTests.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/test') 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 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(); -- cgit v1.2.3