Skip to content

Commit

Permalink
Improved test
Browse files Browse the repository at this point in the history
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
  • Loading branch information
ArnyminerZ committed Sep 5, 2023
1 parent 3c4b528 commit 1eff2f0
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)!!
Expand All @@ -70,5 +71,10 @@ class TestDeletePathEndpoint: ApplicationTestBase() {
}.apply {
assertFailure(Errors.ObjectNotFound)
}

ServerDatabase.instance.query {
val block = Blocking.findById(blocking.id)
assertNull(block)
}
}
}

0 comments on commit 1eff2f0

Please sign in to comment.