mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Fix Konsist test.
New enterprise module was not correctly detected. Also ensure that the files are correctly found.
This commit is contained in:
+9
-2
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
package io.element.android.tests.konsist
|
package io.element.android.tests.konsist
|
||||||
|
|
||||||
|
import com.google.common.truth.Truth.assertThat
|
||||||
import com.lemonappdev.konsist.api.Konsist
|
import com.lemonappdev.konsist.api.Konsist
|
||||||
import com.lemonappdev.konsist.api.verify.assertTrue
|
import com.lemonappdev.konsist.api.verify.assertTrue
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
@@ -43,10 +44,13 @@ class KonsistLicenseTest {
|
|||||||
.scopeFromProject()
|
.scopeFromProject()
|
||||||
.files
|
.files
|
||||||
.filter {
|
.filter {
|
||||||
it.path.contains("/enterprise/features").not() &&
|
it.moduleName.startsWith("enterprise").not() &&
|
||||||
it.nameWithExtension != "locales.kt" &&
|
it.nameWithExtension != "locales.kt" &&
|
||||||
it.name.startsWith("Template ").not()
|
it.name.startsWith("Template ").not()
|
||||||
}
|
}
|
||||||
|
.also {
|
||||||
|
assertThat(it).isNotEmpty()
|
||||||
|
}
|
||||||
.assertTrue {
|
.assertTrue {
|
||||||
publicLicense.containsMatchIn(it.text)
|
publicLicense.containsMatchIn(it.text)
|
||||||
}
|
}
|
||||||
@@ -58,7 +62,10 @@ class KonsistLicenseTest {
|
|||||||
.scopeFromProject()
|
.scopeFromProject()
|
||||||
.files
|
.files
|
||||||
.filter {
|
.filter {
|
||||||
it.path.contains("/enterprise/features")
|
it.moduleName.startsWith("enterprise")
|
||||||
|
}
|
||||||
|
.also {
|
||||||
|
assertThat(it).isNotEmpty()
|
||||||
}
|
}
|
||||||
.assertTrue {
|
.assertTrue {
|
||||||
enterpriseLicense.containsMatchIn(it.text)
|
enterpriseLicense.containsMatchIn(it.text)
|
||||||
|
|||||||
Reference in New Issue
Block a user