Browse Source

Use stored user in account deletion test

tags/v0.10.5
Kristijan Mitrovic 4 years ago
parent
commit
0643518744
1 changed files with 11 additions and 5 deletions
  1. +11
    -5
      bubble-server/src/test/resources/models/tests/account_deletion/full_delete_account.json

+ 11
- 5
bubble-server/src/test/resources/models/tests/account_deletion/full_delete_account.json View File

@@ -12,7 +12,7 @@


{ {
"comment": "look up account policy", "comment": "look up account policy",
"request": { "uri": "users/user-to-delete/policy" },
"request": { "uri": "users/{{user.uuid}}/policy" },
"response": { "response": {
"store": "policy", "store": "policy",
"check": [ "check": [
@@ -25,7 +25,7 @@
{ {
"comment": "set deletion policy to full_delete", "comment": "set deletion policy to full_delete",
"request": { "request": {
"uri": "users/user-to-delete/policy",
"uri": "users/{{user.uuid}}/policy",
"data": "policy", "data": "policy",
"entity": { "entity": {
"deletionPolicy": "full_delete" "deletionPolicy": "full_delete"
@@ -39,11 +39,17 @@
} }
}, },


{
"comment": "lookup user - just checking it is the one for deletion",
"request": { "uri": "users/{{user.uuid}}" },
"response": { "check": [{ "condition": "json.getName() == 'user-to-delete'" }] }
},

{ {
"comment": "as root, delete account", "comment": "as root, delete account",
"request": { "request": {
"session": "rootSession", "session": "rootSession",
"uri": "users/user-to-delete",
"uri": "users/{{user.uuid}}",
"method": "delete" "method": "delete"
} }
}, },
@@ -51,8 +57,8 @@
{ {
"comment": "lookup user, expect not found", "comment": "lookup user, expect not found",
"request": { "request": {
"uri": "users/user-to-delete"
"uri": "users/{{user.uuid}}"
}, },
"response": { "status": 404 } "response": { "status": 404 }
} }
]
]

Loading…
Cancel
Save