Skip to content

Commit 4e0a87d

Browse files
SilviaAmAmsvenvandescheur
authored andcommitted
🧪 [#493] Test options method on co-reviewers endpoint
1 parent b46dac8 commit 4e0a87d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

backend/src/openarchiefbeheer/destruction/tests/endpoints/test_co_reviewers.py

+18
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from django.contrib.auth.models import Group
44
from django.core import mail
5+
from django.test import tag
56
from django.utils.translation import gettext_lazy as _
67

78
from rest_framework import status
@@ -365,3 +366,20 @@ def test_cant_add_more_than_5_co_reviewers(self):
365366
_("The maximum number of allowed co-reviewers is %(max_co_reviewers)s.")
366367
% {"max_co_reviewers": MAX_NUMBER_CO_REVIEWERS},
367368
)
369+
370+
@tag("gh-493")
371+
def test_options_method(self):
372+
destruction_list = DestructionListFactory.create()
373+
assignee = DestructionListAssigneeFactory.create(
374+
destruction_list=destruction_list,
375+
)
376+
377+
self.client.force_authenticate(user=assignee.user)
378+
response = self.client.options(
379+
reverse(
380+
"api:co-reviewers-list",
381+
kwargs={"destruction_list_uuid": destruction_list.uuid},
382+
),
383+
)
384+
385+
self.assertEqual(status.HTTP_200_OK, response.status_code)

0 commit comments

Comments
 (0)