commit 5b18cb6a663394d6c29c87c62dafbee584964e9e
parent fcca16e8d04ff00e408d3c225d77b8afefa2a997
Author: MS <ms@taler.net>
Date: Fri, 20 Jan 2023 16:22:34 +0100
adapt test
Diffstat:
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/nexus/src/test/kotlin/SandboxCircuitApiTest.kt b/nexus/src/test/kotlin/SandboxCircuitApiTest.kt
@@ -9,6 +9,7 @@ import io.ktor.server.testing.*
import io.ktor.util.*
import kotlinx.coroutines.runBlocking
import org.jetbrains.exposed.sql.transactions.transaction
+import org.junit.Ignore
import org.junit.Test
import tech.libeufin.sandbox.*
import java.io.File
@@ -28,7 +29,8 @@ class SandboxCircuitApiTest {
}
}
}
- // Tests that only account with a cash-out address are returned.
+
+ // Only tests that the calls get a 2xx status code.
@Test
fun listAccountsTest() {
withTestDatabase {
@@ -36,15 +38,12 @@ class SandboxCircuitApiTest {
testApplication {
application(sandboxApp)
var R = client.get("/demobanks/default/circuit-api/accounts") {
- expectSuccess = false
basicAuth("admin", "foo")
}
println(R.bodyAsText())
- R = client.get("/demobanks/default/circuit-api/accounts/baz") {
- expectSuccess = false
+ client.get("/demobanks/default/circuit-api/accounts/baz") {
basicAuth("admin", "foo")
}
- println(R.bodyAsText())
}
}
}
@@ -100,7 +99,7 @@ class SandboxCircuitApiTest {
amountCredit = "unused"
subject = "unused"
creationTime = 0L
- tanChannel = "UNUSED" // change type to enum?
+ tanChannel = SupportedTanChannels.FILE // change type to enum?
account = "unused"
state = CashoutOperationState.PENDING
}