Fix tests

pull/2003/head
Alex Baker 2 years ago
parent 1f07b17e75
commit 23bd8ba914

@ -122,7 +122,10 @@ class RepeatRuleToStringTest : InjectingTestCase() {
private fun toString(language: String?, rrule: String): String? { private fun toString(language: String?, rrule: String): String? {
return try { return try {
val locale = language?.let { Locale.forLanguageTag(it) } ?: Locale.getDefault() val locale = language?.let { Locale.forLanguageTag(it) } ?: Locale.getDefault()
RepeatRuleToString(context, locale, firebase) val configuration = context.resources.configuration.apply {
setLocale(locale)
}
RepeatRuleToString(context.createConfigurationContext(configuration), locale, firebase)
.toString(rrule) .toString(rrule)
} catch (e: ParseException) { } catch (e: ParseException) {
throw RuntimeException(e) throw RuntimeException(e)

Loading…
Cancel
Save