toulouse-maelis: make adresse parameter required on update-coordinate endpoint (#70029)
This commit is contained in:
parent
5fce8a2897
commit
ec79fabd50
|
@ -691,6 +691,7 @@ UPDATE_COORDINATE_SCHEMA = {
|
|||
'title': 'Update coordinate',
|
||||
'description': "Mise à jour des coordonnées d'un responsable légal",
|
||||
'type': 'object',
|
||||
'required': ['adresse'],
|
||||
'properties': {
|
||||
'adresse': ADDRESS_SCHEMA,
|
||||
'contact': CONTACT_SCHEMA,
|
||||
|
|
|
@ -1565,6 +1565,16 @@ def test_update_coordinate_schema_error(con, app):
|
|||
'contact/isContactMail': 'true more text',
|
||||
}
|
||||
|
||||
resp = app.post_json(url + '?NameID=local&rl_id=613878', params=params, status=400)
|
||||
assert resp.json['err'] == 1
|
||||
assert resp.json['err_desc'] == "'adresse' is a required property"
|
||||
|
||||
params = {
|
||||
'contact/isContactMail': 'true more text',
|
||||
'adresse/street1': 'Château',
|
||||
'adresse/town': 'Paris',
|
||||
'adresse/zipcode': '75014',
|
||||
}
|
||||
resp = app.post_json(url + '?NameID=local&rl_id=613878', params=params, status=400)
|
||||
assert resp.json['err'] == 1
|
||||
assert resp.json['err_desc'] == "'true more text' is not of type 'boolean'"
|
||||
|
|
Loading…
Reference in New Issue