aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-02-01 20:22:05 +0300
committerGravatar Vitaly Takmazov2023-02-01 21:29:08 +0300
commit57222853c90b0ffc4b800adeeddc289d58ee0a25 (patch)
tree8d658ed98a48fbe7e078ce7da7a4c17c405ffb7a /src/test/java/com/juick
parent225b85bfd43753a4748dca2bc47b7018294cdfd3 (diff)
Store timestamp in milliseconds when using SQLite
Diffstat (limited to 'src/test/java/com/juick')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java3
1 files changed, 1 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 62f50b12..4cbc30b5 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -1779,7 +1779,6 @@ public class ServerTests {
@Test
@Order(20)
- @Disabled("Failed on SQLite")
public void discussionsShouldBePageableByTimestamp() throws Exception {
String msgText = "Привет, я снова Угнич";
int mid = messagesService.createMessage(ugnich.getUid(), msgText, null, Set.of());
@@ -2622,7 +2621,7 @@ public class ServerTests {
"SELECT COUNT(*) FROM auth WHERE user_id=?", Integer.class, ugnich.getUid());
assertThat(count, is(1));
var timestamp = Instant.now().minus(3, ChronoUnit.DAYS).atOffset(ZoneOffset.UTC);
- jdbcTemplate.update("UPDATE auth SET ts=? WHERE user_id=?", timestamp, ugnich.getUid());
+ jdbcTemplate.update("UPDATE auth SET ts=? WHERE user_id=?", ((EmailServiceImpl)emailService).toDateTime(timestamp), ugnich.getUid());
emailService.cleanupAuthCodes();
count = jdbcTemplate.queryForObject(
"SELECT COUNT(*) FROM auth WHERE user_id=?", Integer.class, ugnich.getUid());