Skip to content

Commit 88716aa

Browse files
SilviaAmAmsvenvandescheur
authored andcommitted
🧪 [#493] Fix options endpoint for selection API
1 parent 36e2e7f commit 88716aa

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

backend/src/openarchiefbeheer/selection/tests/test_endpoints.py

+16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from unittest.mock import patch
22

3+
from django.test import tag
34
from django.utils.translation import gettext_lazy as _
45

56
from furl import furl
@@ -507,3 +508,18 @@ def test_urls_not_snakelised(self):
507508
self.assertEqual(
508509
items.first().zaak_url, "http://zaken.nl/api/v1/zaken/shouldNotBeSnakeCase"
509510
)
511+
512+
@tag("gh-493")
513+
def test_options_method(self):
514+
key = "some-key"
515+
SelectionItemFactory.create(
516+
key=key,
517+
is_selected=False,
518+
zaak_url="http://zaken.nl/api/v1/zaken/111-111-111",
519+
)
520+
521+
self.client.force_login(self.user)
522+
523+
response = self.client.options(reverse("api:selections", args=[key]))
524+
525+
self.assertEqual(response.status_code, status.HTTP_200_OK)

0 commit comments

Comments
 (0)