summaryrefslogtreecommitdiffhomepage
path: root/android/service/src
diff options
context:
space:
mode:
authorKalle Lindström <karl.lindstrom@mullvad.net>2025-10-23 13:38:49 +0200
committerKalle Lindström <karl.lindstrom@mullvad.net>2025-10-23 14:12:16 +0200
commit98eab84c1cd238e6b380476f6e36870962386508 (patch)
treedeeb5074429af1470b272a92d4cf8dbc401c4ed6 /android/service/src
parentdbace16b183ae5b4f806fb35f36438ecc5e2fc9d (diff)
downloadmullvadvpn-98eab84c1cd238e6b380476f6e36870962386508.tar.xz
mullvadvpn-98eab84c1cd238e6b380476f6e36870962386508.zip
Fix failing test due to time zone change
Diffstat (limited to 'android/service/src')
-rw-r--r--android/service/src/test/kotlin/net/mullvad/mullvadvpn/service/notifications/accountexpiry/AccountExpiryNotificationTriggerTest.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/android/service/src/test/kotlin/net/mullvad/mullvadvpn/service/notifications/accountexpiry/AccountExpiryNotificationTriggerTest.kt b/android/service/src/test/kotlin/net/mullvad/mullvadvpn/service/notifications/accountexpiry/AccountExpiryNotificationTriggerTest.kt
index ff4340f168..df7ad7705c 100644
--- a/android/service/src/test/kotlin/net/mullvad/mullvadvpn/service/notifications/accountexpiry/AccountExpiryNotificationTriggerTest.kt
+++ b/android/service/src/test/kotlin/net/mullvad/mullvadvpn/service/notifications/accountexpiry/AccountExpiryNotificationTriggerTest.kt
@@ -11,11 +11,11 @@ class AccountExpiryNotificationTriggerTest {
fun `long account expiry should trigger 3 days before expiry`() {
val now = ZonedDateTime.now()
- val threeMonthsExpiry = now.plusDays(90)
+ val threeMonthsExpiry = now.plusHours(90 * 24)
val trigger1 = accountExpiryNotificationTriggerAt(now, threeMonthsExpiry)
assertEquals(87, Duration.between(now, trigger1).toDays())
- val fourAndHalfDaysExpiry = now.plusDays(4).plusHours(12)
+ val fourAndHalfDaysExpiry = now.plusHours(4 * 24 + 12)
val trigger2 = accountExpiryNotificationTriggerAt(now, fourAndHalfDaysExpiry)
assertEquals(Duration.ofDays(1).plusHours(12), Duration.between(now, trigger2))
}