mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-13 17:51:57 +00:00
fix tests
This commit is contained in:
parent
277105e5ed
commit
6fd662945f
3 changed files with 5 additions and 5 deletions
|
|
@ -165,7 +165,7 @@ android {
|
||||||
buildConfigField "String", "TESTING_LEVEL", "\"production\""
|
buildConfigField "String", "TESTING_LEVEL", "\"production\""
|
||||||
resConfigs 'en', 'bg', 'de', 'en-rGB', 'es', 'fr', 'hr-rHR', 'in', 'it', 'iw', 'ja', 'ko', 'lt', 'nl', 'pl', 'pt-rBR', 'pt-rPT', 'ru', 'tr', 'zh', 'zh-rTW'
|
resConfigs 'en', 'bg', 'de', 'en-rGB', 'es', 'fr', 'hr-rHR', 'in', 'it', 'iw', 'ja', 'ko', 'lt', 'nl', 'pl', 'pt-rBR', 'pt-rPT', 'ru', 'tr', 'zh', 'zh-rTW'
|
||||||
|
|
||||||
versionCode 3503
|
versionCode 3504
|
||||||
versionName "3.6"
|
versionName "3.6"
|
||||||
|
|
||||||
targetSdkVersion 32
|
targetSdkVersion 32
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ fun Long.getShortRemainingString(): String {
|
||||||
val diffDays = diff.toInt(DurationUnit.DAYS)
|
val diffDays = diff.toInt(DurationUnit.DAYS)
|
||||||
diff -= diffDays.toDuration(DurationUnit.DAYS)
|
diff -= diffDays.toDuration(DurationUnit.DAYS)
|
||||||
val diffHours = diff.toInt(DurationUnit.HOURS)
|
val diffHours = diff.toInt(DurationUnit.HOURS)
|
||||||
diff -= diffDays.toDuration(DurationUnit.HOURS)
|
diff -= diffHours.toDuration(DurationUnit.HOURS)
|
||||||
val diffMinutes = diff.toInt(DurationUnit.MINUTES)
|
val diffMinutes = diff.toInt(DurationUnit.MINUTES)
|
||||||
diff -= diffMinutes.toDuration(DurationUnit.MINUTES)
|
diff -= diffMinutes.toDuration(DurationUnit.MINUTES)
|
||||||
val diffSeconds = diff.toInt(DurationUnit.SECONDS)
|
val diffSeconds = diff.toInt(DurationUnit.SECONDS)
|
||||||
|
|
|
||||||
|
|
@ -8,16 +8,16 @@ class DateExtensionsTest : BaseAnnotationTestCase() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testGetShortRemainingStringWithDay() {
|
fun testGetShortRemainingStringWithDay() {
|
||||||
"24d 1h 3m" shouldBe (Date().time + 2077400000L).getShortRemainingString()
|
(Date().time + 2077400000L).getShortRemainingString() shouldBe "24d 1h 3m"
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testGetShortRemainingStringWithHour() {
|
fun testGetShortRemainingStringWithHour() {
|
||||||
"5h 46m" shouldBe (Date().time + 20774000L).getShortRemainingString()
|
(Date().time + 20774000L).getShortRemainingString() shouldBe "5h 46m"
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testGetShortRemainingStringWithMinute() {
|
fun testGetShortRemainingStringWithMinute() {
|
||||||
"34m 37s" shouldBe (Date().time + 2077400L).getShortRemainingString()
|
(Date().time + 2077400L).getShortRemainingString() shouldBe "34m 37s"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue