Consent tests: a live receipt for the version in force outranks an older live one

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Heimdall 2026-11-11 11:26:10 +00:00
commit 6a797cb3fa

View file

@ -159,6 +159,17 @@ public sealed class ConsentTests(RegistrationGateFactory factory) : IClassFixtur
Assert.DoesNotContain("/consent/withdraw", html);
}
[Fact]
public async Task A_live_receipt_for_the_version_in_force_outranks_an_older_live_one()
{
var identity = NewIdentity();
Seed(identity, (1, Agreed, null), (TrainingNotice.Version, Agreed.AddDays(1), null));
var html = await PageHtmlAsync(identity);
Assert.Contains($"You agreed to version {TrainingNotice.Version} on 2026-11-02T12:30:05Z", html);
Assert.Contains("action=\"/auth/bifrost/consent/withdraw\"", html);
}
[Fact]
public async Task A_withdrawal_shows_its_time_and_offers_agree()
{