Skip to content

Commit e7de056

Browse files
committed
Fix Konsist test.
New enterprise module was not correctly detected. Also ensure that the files are correctly found.
1 parent e99d166 commit e7de056

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/konsist/src/test/kotlin/io/element/android/tests/konsist/KonsistLicenseTest.kt

+9-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
package io.element.android.tests.konsist
99

10+
import com.google.common.truth.Truth.assertThat
1011
import com.lemonappdev.konsist.api.Konsist
1112
import com.lemonappdev.konsist.api.verify.assertTrue
1213
import org.junit.Test
@@ -43,10 +44,13 @@ class KonsistLicenseTest {
4344
.scopeFromProject()
4445
.files
4546
.filter {
46-
it.path.contains("/enterprise/features").not() &&
47+
it.moduleName.startsWith("enterprise").not() &&
4748
it.nameWithExtension != "locales.kt" &&
4849
it.name.startsWith("Template ").not()
4950
}
51+
.also {
52+
assertThat(it).isNotEmpty()
53+
}
5054
.assertTrue {
5155
publicLicense.containsMatchIn(it.text)
5256
}
@@ -58,7 +62,10 @@ class KonsistLicenseTest {
5862
.scopeFromProject()
5963
.files
6064
.filter {
61-
it.path.contains("/enterprise/features")
65+
it.moduleName.startsWith("enterprise")
66+
}
67+
.also {
68+
assertThat(it).isNotEmpty()
6269
}
6370
.assertTrue {
6471
enterpriseLicense.containsMatchIn(it.text)

0 commit comments

Comments
 (0)