Skip to content

Commit 83dc682

Browse files
tarrowdeer-wmde
authored andcommitted
Release 10x.18.8 (#908)
Also add a couple more validation test cases
1 parent 3aced1b commit 83dc682

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# api
22

3+
## 10x.18.8
4+
- Fix WikiProfile Validation
5+
36
## 10x.18.7
47
- Include WikiProfile model and migration
58

tests/Helper/ProfileValidatorTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ private function invalidProfileProvider() {
4949
'audience' => 'narrow',
5050
'temporality' => 'other',
5151
] ],
52+
[ 'audience is empty string' => [
53+
'purpose' => 'data_hub',
54+
'audience' => '',
55+
'temporality' => 'other',
56+
] ],
5257
[ 'audience key present when purpose not data_hub' => [
5358
'purpose' => 'data_lab',
5459
'audience' => 'narrow',

tests/Routes/Wiki/CreateTest.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,12 @@ static public function createWikiHandlesRangeOfPostValuesProvider(): array {
284284
"temporality": "permanent",
285285
"purpose": "data_hub"
286286
}';
287+
$profileWithAudienceBlank = self::defaultData;
288+
$profileWithAudienceBlank['profile'] = '{
289+
"audience": "",
290+
"temporality": "permanent",
291+
"purpose": "data_hub"
292+
}';
287293
return [
288294
'all params present' => [self::defaultData , 200],
289295
'missing domain' => [$noDomain, 422],
@@ -292,7 +298,8 @@ static public function createWikiHandlesRangeOfPostValuesProvider(): array {
292298
'missing profile' => [$noprofile, 200],
293299
'profile with other' => [$profileWithOther, 200],
294300
'profile with other string missing' => [$profileWithOtherStringMissing, 422],
295-
'profile with extraneous other' => [$profileWithExtraneousOther, 422]
301+
'profile with extraneous other' => [$profileWithExtraneousOther, 422],
302+
'profile with audience blank string' => [$profileWithAudienceBlank, 422]
296303
];
297304
}
298305

0 commit comments

Comments
 (0)