aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-04-07 11:13:58 +0300
committerGravatar Vitaly Takmazov2022-12-08 08:09:37 +0300
commit912171165155ff78ad111c9c4043844c34567a42 (patch)
tree876278eb4338d73d294ef55f10471d08f2b3e38b /src/test/java/com/juick
parenta6dff3324a55540877deaed23083ea502706a5ae (diff)
Configure caches
* caching is disabled because of OOMs in production
Diffstat (limited to 'src/test/java/com/juick')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index 367b8e47..1e956855 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -2331,18 +2331,18 @@ public class ServerTests {
}
@Test
- public void verifiedUsersTest() {
- assertThat(userService.getUserByName("ugnich").isVerified(), is(false));
- jdbcTemplate.update("INSERT INTO telegram(user_id, tg_id) VALUES(?, ?)", ugnich.getUid(),
- "100001866137681");
- assertThat(userService.canDeleteTelegramUser(userService.getUserByName("ugnich")), is(false));
- jdbcTemplate.update("INSERT INTO facebook(user_id, fb_id) VALUES(?, ?)", ugnich.getUid(),
- "100001866137681");
- assertThat(userService.getUserByName("ugnich").isVerified(), is(true));
- assertThat(userService.canDeleteTelegramUser(userService.getUserByName("ugnich")), is(true));
- jdbcTemplate.update("DELETE FROM facebook");
- assertThat(userService.canDeleteTelegramUser(userService.getUserByName("ugnich")), is(false));
- }
+ public void verifiedUsersTest() {
+ assertThat(userService.getUserByName("ugnich").isVerified(), is(false));
+ jdbcTemplate.update("INSERT INTO telegram(user_id, tg_id) VALUES(?, ?)", ugnich.getUid(), "100001866137681");
+ assertThat(userService.canDeleteTelegramUser(userService.getUserByName("ugnich")), is(false));
+ userService.addFacebookState("12345", "http://localhost");
+ userService.createFacebookUser(12345, "12345", "5678", "ugnich");
+ userService.setFacebookUser("12345", ugnich.getUid());
+ assertThat(userService.getUserByName("ugnich").isVerified(), is(true));
+ assertThat(userService.canDeleteTelegramUser(userService.getUserByName("ugnich")), is(true));
+ jdbcTemplate.update("DELETE FROM facebook");
+ assertThat(userService.canDeleteTelegramUser(userService.getUserByName("ugnich")), is(false));
+ }
@Test
@Disabled("FIXME: profile changed as expected, but cache is not refreshed or something")