Skip to content

Commit 71c0b44

Browse files
authored
Fix #1522: Add negative approval mock (#1524)
1 parent c3ce821 commit 71c0b44

File tree

5 files changed

+47
-0
lines changed

5 files changed

+47
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"result": "NOK",
3+
"resultReason": "no reason"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"result": "WAIT",
3+
"resultReason": "no reason"
4+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"priority": 1,
3+
"request": {
4+
"method": "POST",
5+
"url": "/client/approve",
6+
"bodyPatterns": [
7+
{
8+
"matchesJsonPath": "$[?(@.userId =~ /mockuser_6666.*/)]"
9+
}
10+
]
11+
},
12+
"response": {
13+
"status": 200,
14+
"headers": {
15+
"Content-Type": "application/json"
16+
},
17+
"bodyFileName": "body-client-approve-nok.json"
18+
}
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"priority": 2,
3+
"request": {
4+
"method": "POST",
5+
"url": "/client/approve",
6+
"bodyPatterns": [
7+
{
8+
"matchesJsonPath": "$[?(@.userId =~ /mockuser_8888.*/)]"
9+
}
10+
]
11+
},
12+
"response": {
13+
"status": 200,
14+
"headers": {
15+
"Content-Type": "application/json"
16+
},
17+
"bodyFileName": "body-client-approve-nok.json"
18+
}
19+
}

enrollment-server-onboarding-adapter-mock/src/test/wiremock/mappings/client-approve.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"priority": 10,
23
"request": {
34
"method": "POST",
45
"url": "/client/approve"

0 commit comments

Comments
 (0)