toulouse-maelis: allow to pass empty recurrent week list (#)
gitea/passerelle/pipeline/head This commit looks good Details

This commit is contained in:
Nicolas Roche 2023-02-24 11:48:42 +01:00
parent dba8310fd0
commit e1db83e2a0
2 changed files with 11 additions and 2 deletions

View File

@ -75,8 +75,13 @@ SUBSCRIPTION_SCHEMA = {
'pattern': '^[0-9]{4}-[0-9]{2}-[0-9]{2}$',
},
'recurrent_week': {
'type': 'array',
'items': {'type': 'string'},
'oneOf': [
{
'type': 'array',
'items': {'type': 'string'},
},
{'type': 'null'},
],
},
'conveyanceSubscribe': {
'type': 'object',

View File

@ -6080,6 +6080,10 @@ def test_add_person_basket_subscription(activity_service, con, app):
},
}
params['recurrent_week'] = None
resp = app.post_json(url + '?NameID=local', params=params)
assert resp.json['err'] == 0
def test_add_person_basket_subscription_with_recurrent_week(activity_service, con, app):
def request_check(request):