File tree Expand file tree Collapse file tree
tests/integration/features/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Feature : orphaned profile field value repair
2+ Background :
3+ Given user "repairuser" exists
4+ And run the command "profile_fields:developer:reset --all" with result code 0
5+
6+ Scenario : maintenance:repair removes values for deleted users without errors
7+ Given as user "admin"
8+ When sending "post" to ocs "/apps/profile_fields/api/v1/definitions"
9+ | fieldKey | repair_test_field |
10+ | label | Repair test |
11+ | type | text |
12+ | editPolicy | users |
13+ | exposurePolicy | private |
14+ | sortOrder | 10 |
15+ | active | true |
16+ Then the response should have a status code 201
17+ And fetch field "(REPAIR_FIELD_ID)(jq).ocs.data.id" from previous JSON response
18+ When sending "put" to ocs "/apps/profile_fields/api/v1/users/repairuser/values/<REPAIR_FIELD_ID>"
19+ | value | orphaned |
20+ Then the response should have a status code 200
21+ And run the command "user:delete repairuser" with result code 0
22+ And run the command "maintenance:repair" with result code 0
23+ And the output of the last command should contain the following text:
24+ """
25+ Repair orphaned profile field values
26+ """
You can’t perform that action at this time.
0 commit comments