Skip to content

Commit

Permalink
Fiks test som feila pga. tidspresisjon
Browse files Browse the repository at this point in the history
  • Loading branch information
slovrid committed Dec 3, 2024
1 parent 21e344c commit a671ecb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.jdbc.core.JdbcTemplate
import java.time.ZonedDateTime
import java.time.temporal.ChronoUnit
import java.util.UUID.randomUUID

@SpringBootTest(classes = [ApplicationConfigTest::class])
Expand Down Expand Up @@ -95,7 +96,7 @@ class HendelseRepositoryTest(
fun `skal hente den eldste Hendelse når flere hendelser eksisterer for person`() {
// Given
val personIdent = randomNorskIdent()
val naa = ZonedDateTime.now()
val naa = ZonedDateTime.now().truncatedTo(ChronoUnit.MICROS)
val hendelseEldste = genererRandomHendelse(personIdent = personIdent, hendelseDato = naa.minusDays(2))
val hendelseNestEldste = genererRandomHendelse(personIdent = personIdent, hendelseDato = naa.minusDays(1))
val hendelseNyeste = genererRandomHendelse(personIdent = personIdent, hendelseDato = naa)
Expand Down

0 comments on commit a671ecb

Please sign in to comment.