✅ Fix tests failing with non-English locales
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 23 Jul 2022 21:57:33 +0000 (23:57 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 23 Jul 2022 21:57:33 +0000 (23:57 +0200)
commitbc8f2705a88d987f597c925fab05b2eb1cf73daa
tree3189543715a459fc7b8f9268eaa262dc678790a1
parentb3c31725b779d0287fff79728227556751f837f2
✅ Fix tests failing with non-English locales

For most of the tests it was sufficient to use the OverrideLocale TestRule added in the previous commit but in one case the creation of a date formatter needed to be delayed so that it uses the update locale during the test.
src/main/kotlin/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.kt
src/test/kotlin/net/pterodactylus/sone/template/DurationFormatFilterTest.kt
src/test/kotlin/net/pterodactylus/sone/template/HistogramRendererTest.kt
src/test/kotlin/net/pterodactylus/sone/web/ajax/GetStatusAjaxPageTest.kt
src/test/kotlin/net/pterodactylus/sone/web/ajax/GetTimesAjaxPageTest.kt