test(bff): self-service withdraw is owner-scoped and relays not-found (refs #12)
The withdraw handler returns an outcome and refuses a bsn that doesn't own the registration; the BFF endpoint requires a digid token, forwards id+bsn, and relays the domain's 404. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -82,6 +82,18 @@ internal sealed class FakeDomainClient : IDomainClient
|
||||
return Task.FromResult(Result);
|
||||
}
|
||||
|
||||
public (string RegistrationId, string Bsn)? Withdrawn { get; private set; }
|
||||
|
||||
/// <summary>Whether the fake domain reports the withdrawal as done (true → 204) or not-found/not-owned
|
||||
/// (false → 404). Tests set this to exercise the relay.</summary>
|
||||
public bool WithdrawSucceeds { get; set; } = true;
|
||||
|
||||
public Task<bool> WithdrawRegistrationAsync(string registrationId, string bsn, CancellationToken ct = default)
|
||||
{
|
||||
Withdrawn = (registrationId, bsn);
|
||||
return Task.FromResult(WithdrawSucceeds);
|
||||
}
|
||||
|
||||
public (string RegistrationId, string Besluit)? Decided { get; private set; }
|
||||
|
||||
public Task<IReadOnlyList<WerkbakItem>> GetWerkbakAsync(CancellationToken ct = default)
|
||||
|
||||
Reference in New Issue
Block a user