From a4b83e13a66ca19f5539575a2c16489ceebbc0ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amalie=20Mans=C3=A5ker?= Date: Wed, 26 Jul 2023 12:36:44 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Fikser=20failende=20tester?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sindre Kjelsrud Co-authored-by: Markus A. R. Johansen --- .../test/kotlin/no/nav/helse/sprik/FeilmeldingTest.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/backend/src/test/kotlin/no/nav/helse/sprik/FeilmeldingTest.kt b/backend/src/test/kotlin/no/nav/helse/sprik/FeilmeldingTest.kt index 38e0759..37bfe18 100644 --- a/backend/src/test/kotlin/no/nav/helse/sprik/FeilmeldingTest.kt +++ b/backend/src/test/kotlin/no/nav/helse/sprik/FeilmeldingTest.kt @@ -8,9 +8,9 @@ import no.nav.helse.sprik.modell.Feilmelding import org.jetbrains.exposed.sql.deleteAll import org.jetbrains.exposed.sql.selectAll import org.jetbrains.exposed.sql.transactions.transaction -import org.junit.jupiter.api.AfterAll import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.api.TestInstance import java.time.LocalDateTime @@ -28,9 +28,14 @@ class FeilmeldingTest { @BeforeAll fun setup() { ExposedDatabase.connect(database.dataSource) - feilmeldingRepository.lagre(feilmelding) } + + @BeforeEach + fun lagreFeilmelding() { + feilmeldingRepository.lagre(feilmelding) + } + @AfterEach fun wipe() { transaction {