test(acl): diploma document sets indicatiegebruiksrecht so the zaak can close (refs #103)

The behandelaar approval closes the zaak via OpenZaak. A related
informatieobject with indicatieGebruiksrecht left null makes OpenZaak
reject the close (400 indicatiegebruiksrecht-unset), surfacing as a 500
and failing the registration e2e flow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
not
2026-07-21 13:31:44 +02:00
co-authored by Claude Opus 4.8
parent 5325a99755
commit 53e9564f94
2 changed files with 6 additions and 0 deletions
@@ -118,6 +118,9 @@ public sealed class OpenZaakGatewayIntegrationTests(OpenZaakFixture stack)
Assert.Equal("diploma.pdf", doc.GetProperty("bestandsnaam").GetString()); Assert.Equal("diploma.pdf", doc.GetProperty("bestandsnaam").GetString());
Assert.Equal(informatieobjecttype.ToString(), doc.GetProperty("informatieobjecttype").GetString()); Assert.Equal(informatieobjecttype.ToString(), doc.GetProperty("informatieobjecttype").GetString());
Assert.Equal(content.Length, doc.GetProperty("bestandsomvang").GetInt32()); Assert.Equal(content.Length, doc.GetProperty("bestandsomvang").GetInt32());
// indicatieGebruiksrecht is recorded as "no restrictions"; left null, OpenZaak would refuse to
// close the zaak this document is related to (the S-10b regression that broke the e2e flow).
Assert.False(doc.GetProperty("indicatiegebruiksrecht").GetBoolean());
// ...and it is related to the zaak (a zaakinformatieobject links the two). // ...and it is related to the zaak (a zaakinformatieobject links the two).
var relations = await stack.GetJsonAsync(new Uri(stack.BaseUrl, var relations = await stack.GetJsonAsync(new Uri(stack.BaseUrl,
@@ -489,6 +489,9 @@ public class OpenZaakGatewayTests
Assert.Contains("\"formaat\":\"application/pdf\"", create.Body); Assert.Contains("\"formaat\":\"application/pdf\"", create.Body);
Assert.Contains("\"vertrouwelijkheidaanduiding\":\"openbaar\"", create.Body); Assert.Contains("\"vertrouwelijkheidaanduiding\":\"openbaar\"", create.Body);
Assert.Contains("\"status\":\"definitief\"", create.Body); Assert.Contains("\"status\":\"definitief\"", create.Body);
// indicatieGebruiksrecht must be set explicitly (false = no usage restrictions); left null,
// OpenZaak refuses to close the zaak this document is related to ("indicatiegebruiksrecht-unset").
Assert.Contains("\"indicatiegebruiksrecht\":false", create.Body);
// The file content is base64-encoded into `inhoud`, with its byte length in `bestandsomvang`. // The file content is base64-encoded into `inhoud`, with its byte length in `bestandsomvang`.
Assert.Contains($"\"inhoud\":\"{Convert.ToBase64String([10, 20, 30])}\"", create.Body); Assert.Contains($"\"inhoud\":\"{Convert.ToBase64String([10, 20, 30])}\"", create.Body);
Assert.Contains("\"bestandsomvang\":3", create.Body); Assert.Contains("\"bestandsomvang\":3", create.Body);