1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-11-09 20:42:34 +01:00

Fix theme provider test

This commit is contained in:
Allan Wang 2021-01-13 00:32:09 -08:00
parent a99ce27219
commit 8fe2427cff
No known key found for this signature in database
GPG Key ID: 69D90B885D405BDB

View File

@ -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}")
}
}
}
}