fix tests

This commit is contained in:
2023-04-06 00:07:41 +02:00
parent b96ffcc5ea
commit 7d39dcf248
3 changed files with 6 additions and 3 deletions

View File

@@ -14,6 +14,7 @@
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" />
<option name="NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS" value="2147483647" />
<option name="IMPORT_NESTED_CLASSES" value="true" />
<option name="ALLOW_TRAILING_COMMA" value="true" />
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<SqlCodeStyleSettings version="6">

View File

@@ -83,12 +83,12 @@ class MigrationTest : TestAbstract() {
val resourcesFunctions = this::class.java.getResource("/sql/function/Test")!!.toURI()
Migrations(listOf(resources, resourcesFunctions), connection).apply {
up().apply {
size `should be equal to` 6
size `should be equal to` 7
}
}
Migrations(listOf(resources, resourcesFunctions), connection).apply {
forceAllDown().apply {
size `should be equal to` 6
size `should be equal to` 7
}
}
}
@@ -97,7 +97,7 @@ class MigrationTest : TestAbstract() {
fun `run functions migrations`() {
val resources = this::class.java.getResource("/sql/function/Test")!!.toURI()
Migrations(resources, connection).apply {
run().size `should be equal to` 5
run().size `should be equal to` 6
}
val objTest: RequesterTest.ObjTest? = Requester(connection, functionsDirectory = resources)

View File

@@ -1,10 +1,12 @@
package fr.postgresjson.functionGenerator
import fr.postgresjson.definition.Function
import io.kotest.core.Tag
import io.kotest.core.spec.style.StringSpec
import org.amshove.kluent.`should be equal to`
class FunctionGeneratorTest : StringSpec({
tags(Tag("Generator"))
val functionDirectory = this::class.java.getResource("/sql/function/Test")!!.toURI()
val generator = FunctionGenerator(functionDirectory)