Skip to content

Commit

Permalink
Oppdater flere tester
Browse files Browse the repository at this point in the history
  • Loading branch information
emilps committed Jan 13, 2025
1 parent 05c91d6 commit ce9f475
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ internal class BeregningRoutesTest {
}

@Test
fun `skal returnere not found naar saksbehandler ikke har tilgang til behandling`() {
fun `skal returnere forbidden naar saksbehandler ikke har tilgang til behandling`() {
val beregning = beregning()

every { beregningRepository.hent(beregning.behandlingId) } returns beregning
Expand All @@ -137,7 +137,7 @@ internal class BeregningRoutesTest {
header(HttpHeaders.ContentType, ContentType.Application.Json.toString())
header(HttpHeaders.Authorization, "Bearer $token")
}.let {
it.status shouldBe HttpStatusCode.NotFound
it.status shouldBe HttpStatusCode.Forbidden
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ internal class BeregningsGrunnlagRoutesTest {
}

@Test
fun `skal returnere not found naar saksbehandler ikke har tilgang til behandling`() {
fun `skal returnere forbidden naar saksbehandler ikke har tilgang til behandling`() {
coEvery { behandlingKlient.harTilgangTilBehandling(any(), any(), any()) } returns false

testApplication {
Expand All @@ -251,13 +251,13 @@ internal class BeregningsGrunnlagRoutesTest {
header(HttpHeaders.ContentType, ContentType.Application.Json.toString())
header(HttpHeaders.Authorization, "Bearer $token")
}.let {
it.status shouldBe HttpStatusCode.NotFound
it.status shouldBe HttpStatusCode.Forbidden
}
}
}

@Test
fun `skal returnere not found naar saksbehandler ikke har tilgang til behandling ved opprettelse`() {
fun `skal returnere forbidden naar saksbehandler ikke har tilgang til behandling ved opprettelse`() {
coEvery { behandlingKlient.harTilgangTilBehandling(any(), any(), any()) } returns false

testApplication {
Expand All @@ -277,7 +277,7 @@ internal class BeregningsGrunnlagRoutesTest {
),
)
}.let {
it.status shouldBe HttpStatusCode.NotFound
it.status shouldBe HttpStatusCode.Forbidden
}
}
}
Expand Down

0 comments on commit ce9f475

Please sign in to comment.