From 6a797cb3fa033b9908c353115337125eb2ee6079 Mon Sep 17 00:00:00 2001 From: Heimdall Date: Wed, 11 Nov 2026 11:26:10 +0000 Subject: [PATCH] Consent tests: a live receipt for the version in force outranks an older live one Co-Authored-By: Claude Sonnet 5.5 --- tests/Bifrost.Web.Tests/ConsentTests.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Bifrost.Web.Tests/ConsentTests.cs b/tests/Bifrost.Web.Tests/ConsentTests.cs index b17a6e8..e6b55cc 100644 --- a/tests/Bifrost.Web.Tests/ConsentTests.cs +++ b/tests/Bifrost.Web.Tests/ConsentTests.cs @@ -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() {