Skip to content

Commit

Permalink
Sikre at manuelle barnetilsynsperioder ikke fjernes om de ikke må i f…
Browse files Browse the repository at this point in the history
…orbindelse med endring av virkningsdato
  • Loading branch information
s148719 committed Dec 13, 2024
1 parent f53f431 commit 9377fef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ fun Underholdskostnad.erstatteOffentligePerioderIBarnetilsynstabellMedOppdatertG
?.filter { this.person.ident == it.barnPersonId }

barnetilsynFraGrunnlag?.let { g ->
barnetilsyn.clear()
barnetilsyn.removeAll(barnetilsyn.filter { Kilde.OFFENTLIG == it.kilde })
g.forEach { barnetilsyn.add(it.tilBarnetilsyn(this)) }
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,12 @@ class UnderholdServiceTest {
perioderBearbeida.shouldBeEmpty()
}

u.barnetilsyn.shouldHaveSize(0)
assertSoftly(u.barnetilsyn) {
shouldHaveSize(1)
first().kilde shouldBe Kilde.MANUELL
first().fom shouldBe b.virkningstidspunkt
first().tom shouldBe null
}
}
}

Expand Down

0 comments on commit 9377fef

Please sign in to comment.