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() {