From 1eff2f0a20c913fe15b1f487582a56d65d4ee8d9 Mon Sep 17 00:00:00 2001 From: Arnau Mora Date: Tue, 5 Sep 2023 11:39:30 +0200 Subject: [PATCH] Improved test Signed-off-by: Arnau Mora --- .../server/endpoints/delete/TestDeletePathEndpoint.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/test/kotlin/com/arnyminerz/escalaralcoiaicomtat/backend/server/endpoints/delete/TestDeletePathEndpoint.kt b/src/test/kotlin/com/arnyminerz/escalaralcoiaicomtat/backend/server/endpoints/delete/TestDeletePathEndpoint.kt index 3ccfc2f..5e6daca 100644 --- a/src/test/kotlin/com/arnyminerz/escalaralcoiaicomtat/backend/server/endpoints/delete/TestDeletePathEndpoint.kt +++ b/src/test/kotlin/com/arnyminerz/escalaralcoiaicomtat/backend/server/endpoints/delete/TestDeletePathEndpoint.kt @@ -15,6 +15,7 @@ import io.ktor.client.request.header import io.ktor.http.HttpHeaders import kotlin.test.Test import kotlin.test.assertNotNull +import kotlin.test.assertNull class TestDeletePathEndpoint: ApplicationTestBase() { @Test @@ -46,7 +47,7 @@ class TestDeletePathEndpoint: ApplicationTestBase() { assertNotNull(pathId) - ServerDatabase.instance.query { + val blocking = ServerDatabase.instance.query { Blocking.new { type = BlockingTypes.BUILD path = Path.findById(pathId)!! @@ -70,5 +71,10 @@ class TestDeletePathEndpoint: ApplicationTestBase() { }.apply { assertFailure(Errors.ObjectNotFound) } + + ServerDatabase.instance.query { + val block = Blocking.findById(blocking.id) + assertNull(block) + } } }