From 8fe2427cff223a509441545227ac58b215903929 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Wed, 13 Jan 2021 00:32:09 -0800 Subject: Fix theme provider test --- .../com/pitchedapps/frost/injectors/ThemeProviderTest.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/src/test/kotlin/com/pitchedapps/frost/injectors/ThemeProviderTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/injectors/ThemeProviderTest.kt index f59980d2..e1ef6225 100644 --- a/app/src/test/kotlin/com/pitchedapps/frost/injectors/ThemeProviderTest.kt +++ b/app/src/test/kotlin/com/pitchedapps/frost/injectors/ThemeProviderTest.kt @@ -16,6 +16,8 @@ */ package com.pitchedapps.frost.injectors +import com.pitchedapps.frost.enums.Theme +import com.pitchedapps.frost.enums.ThemeCategory import java.io.File import kotlin.test.Test import kotlin.test.assertTrue @@ -24,9 +26,11 @@ class ThemeProviderTest { @Test fun verifyAssetsExist() { - ThemeProvider.values().forEach { asset -> - val file = File("src/web/assets/css/${asset.folder}/${asset.file}").absoluteFile - assertTrue(file.exists(), "${asset.name} not found at ${file.path}") + ThemeCategory.values().forEach { category -> + Theme.values.filter { it != Theme.DEFAULT }.forEach { theme -> + val file = File("src/web/assets/css/${category.folder}/themes/${theme.file}").absoluteFile + assertTrue(file.exists(), "${theme.name} not found at ${file.path}") + } } } } -- cgit v1.2.3