tests: test api to add agenda with only required parameters (#57670)

This commit is contained in:
Nicolas Roche 2021-10-08 09:30:09 +02:00
parent df4820c0bb
commit 7284c9084c
1 changed files with 11 additions and 0 deletions

View File

@ -660,6 +660,17 @@ def test_add_agenda(app, user, settings):
'minimal_booking_delay_in_working_days': ['Option not available on meetings agenda']
}
# add an agenda using only required fields
params = {
'label': 'My Agenda',
'slug': 'my-agenda',
}
resp = app.post(api_url, params=params)
assert not resp.json['err']
assert len(resp.json['data']) == 1
agenda = Agenda.objects.get(slug='my-agenda')
assert agenda.kind == 'events'
settings.WORKING_DAY_CALENDAR = 'workalendar.europe.France'
edit_group = Group.objects.create(name='Edit')
view_group = Group.objects.create(name='View')