Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
baskevold committed Sep 3, 2024
1 parent d2e9145 commit 7e1658c
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,22 @@ class OppgaveQueryTest : AbstractK9LosIntegrationTest() {
))))).isNotEmpty()
}

@Test
fun `Filtere uten feltverdier skal ha samme resultat som om filtret ikke er brukt`() {
val behandlingUuid = UUID.randomUUID().toString()
OppgaveTestDataBuilder()
.medOppgaveFeltVerdi(FeltType.BEHANDLINGUUID, behandlingUuid)
.lagOgLagre()

val oppgaveQueryRepository = OppgaveQueryRepository(dataSource, mockk<FeltdefinisjonRepository>())

assertThat(oppgaveQueryRepository.query(QueryRequest(OppgaveQuery(listOf())))).isNotEmpty()

assertThat(oppgaveQueryRepository.query(QueryRequest(OppgaveQuery(listOf(
byggFilterK9(FeltType.BEHANDLINGUUID, FeltverdiOperator.IN),
))))).isNotEmpty()
}

@Test
fun `sjekker at ekskluderer-verdi-query finner oppgaver som ikke har feltet`() {
val testbuilder = OppgaveTestDataBuilder()
Expand Down Expand Up @@ -546,8 +562,6 @@ class OppgaveQueryTest : AbstractK9LosIntegrationTest() {
assertThat(oppgaveQueryRepository.query(QueryRequest(query))).isEmpty()
}



private fun lagOppgaveMedPepCache(
kode6: Boolean = false,
kode7: Boolean = false,
Expand Down

0 comments on commit 7e1658c

Please sign in to comment.