Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
b Forsøker å gjøre AktorIdCache-testen mer robust.
Browse files Browse the repository at this point in the history
Får innimellom noen klokkeissues som jeg forsøker å skrive oss bort fra.
  • Loading branch information
tlheen committed Feb 1, 2023
1 parent 69fbbaf commit ff51365
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase
import org.springframework.boot.test.autoconfigure.jdbc.JdbcTest
import org.springframework.test.context.ContextConfiguration
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.temporal.ChronoUnit
import kotlin.test.assertEquals
Expand All @@ -31,7 +32,7 @@ class AktorIdCacheRepositoryDbIntegrationTest(
val FOEDSELSNUMMER = Foedselsnummer("01234567890")
val AKTORID = AktorId("1000010000100")

aktorIdCacheRepository.lagre(AktorIdCache(FOEDSELSNUMMER, AKTORID, LocalDateTime.now()))
aktorIdCacheRepository.lagre(AktorIdCache(FOEDSELSNUMMER, AKTORID, LocalDate.now().atStartOfDay()))

val aktorIdCache = aktorIdCacheRepository.hentAktørId(FOEDSELSNUMMER)
assertNotNull(aktorIdCache)
Expand All @@ -47,8 +48,8 @@ class AktorIdCacheRepositoryDbIntegrationTest(

@Test
fun `ikke gjøre endring ved insetting av eksisterende bruker`(){
val opprettetDatoOriginal = LocalDateTime.now().minusDays(1)
val opprettetDatoNy = LocalDateTime.now()
val opprettetDatoOriginal = LocalDate.now().atStartOfDay().minusDays(1)
val opprettetDatoNy = LocalDate.now().atStartOfDay()

val FOEDSELSNUMMER = Foedselsnummer("01234567890")
val AKTORID = AktorId("1000010000100")
Expand Down

0 comments on commit ff51365

Please sign in to comment.