Skip to content

Commit

Permalink
legg til test for userinfo v2
Browse files Browse the repository at this point in the history
  • Loading branch information
kenglxn committed Oct 15, 2024
1 parent 7cf956b commit 8ce6749
Showing 1 changed file with 99 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,105 @@ class UserInfoControllerTest {
)
}
}

mockMvc.get("/api/userInfo/v2") {
with(jwtWithPid("42"))
}.asyncDispatch().andExpect {
status { isOk() }
content {
json(
"""
{
"altinnError": false,
"digisyfoError": false,
"organisasjoner": [
{
"orgNr": "1",
"altinn3Tilganger": [],
"altinn2Tilganger": [],
"underenheter": [
{
"orgNr": "10",
"altinn3Tilganger": [],
"altinn2Tilganger": [
"3403:1"
],
"underenheter": [],
"name": "underenhet",
"organizationForm": "BEDR"
}
],
"name": "overenhet",
"organizationForm": "AS"
}
],
"tilganger": {
"3403:1": [
"10"
]
},
"digisyfoOrganisasjoner": [
{
"organisasjon": {
"Name": "underenhet",
"ParentOrganizationNumber": "1",
"OrganizationNumber": "10",
"OrganizationForm": "BEDR"
},
"antallSykmeldte": 0
},
{
"organisasjon": {
"Name": "overenhet",
"ParentOrganizationNumber": null,
"OrganizationNumber": "1",
"OrganizationForm": "AS"
},
"antallSykmeldte": 0
},
{
"organisasjon": {
"Name": "underenhet",
"ParentOrganizationNumber": "2",
"OrganizationNumber": "20",
"OrganizationForm": "BEDR"
},
"antallSykmeldte": 1
},
{
"organisasjon": {
"Name": "overenhet",
"ParentOrganizationNumber": null,
"OrganizationNumber": "2",
"OrganizationForm": "AS"
},
"antallSykmeldte": 0
}
],
"refusjoner": [
{
"virksomhetsnummer": "314",
"statusoversikt": {
"ny": 1,
"gammel": 2
},
"tilgang": true
},
{
"virksomhetsnummer": "315",
"statusoversikt": {
"ny": 2,
"gammel": 1
},
"tilgang": true
}
]
}
""",
true
)
}
}
}

@Test
Expand Down

0 comments on commit 8ce6749

Please sign in to comment.