Skip to content

Commit bc2e54d

Browse files
committed
🧪 [#539] Test with no resultaat on zaak
1 parent 8f56121 commit bc2e54d

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

backend/src/openarchiefbeheer/logging/tests/test_logevent.py

+31-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from datetime import date
22

3-
from django.test import TestCase
3+
from django.test import TestCase, tag
44

55
from timeline_logger.models import TimelineLog
66

@@ -129,3 +129,33 @@ def test_destruction_list_ready_for_first_review(self):
129129
)
130130
self.assertEqual(extra_data["comment"], "A list to test logging data.")
131131
self.assertEqual(extra_data["number_of_zaken"], 3)
132+
133+
@tag("gh-539")
134+
def test_resultaat_of_zaak_can_be_not_set(self):
135+
user = UserFactory.create(post__can_start_destruction=True)
136+
destruction_list = DestructionListFactory.create(
137+
comment="A list to test logging data.", author=user
138+
)
139+
item = DestructionListItemFactory.create(
140+
destruction_list=destruction_list,
141+
with_zaak=True,
142+
)
143+
item.zaak._expand = {
144+
"zaaktype": {
145+
"url": "http://catalogi-api.nl/catalogi/api/v1/zaakypen/111-111-111",
146+
"identificatie": "ZAAKTYPE-01",
147+
"omschrijving": "ZAAKTYPE 1.0",
148+
"versiedatum": "2024-01-01",
149+
},
150+
# No resultaat present
151+
}
152+
item.zaak.save()
153+
154+
logevent.destruction_list_ready_for_first_review(destruction_list, user)
155+
156+
log = TimelineLog.objects.for_object(destruction_list)[0]
157+
158+
self.assertEqual(
159+
log.extra_data["resultaten"],
160+
[],
161+
)

0 commit comments

Comments
 (0)