From d743e4f363ebfab301613a47acecf00838637066 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 11 Oct 2026 23:00:06 +0200 Subject: [PATCH] Heimdall tests: an unreadable form with a genuine attempt cookie present is still no attempt Co-Authored-By: Claude Sonnet 5.5 --- tests/Bifrost.Web.Tests/HeimdallCompletionTests.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/Bifrost.Web.Tests/HeimdallCompletionTests.cs b/tests/Bifrost.Web.Tests/HeimdallCompletionTests.cs index 778901c..3439b43 100644 --- a/tests/Bifrost.Web.Tests/HeimdallCompletionTests.cs +++ b/tests/Bifrost.Web.Tests/HeimdallCompletionTests.cs @@ -714,9 +714,12 @@ public sealed class HeimdallCompletionTests results.Add(("ill-formed nonce", illFormed, "Heimdall completion has no attempt for this browser.")); using var client = host.NewClient(); - using var json = await client.PostAsync( - "/auth/heimdall/complete", - new StringContent("{\"attempt\":\"x\"}", Encoding.UTF8, "application/json")); + using var jsonRequest = new HttpRequestMessage(HttpMethod.Post, "/auth/heimdall/complete") + { + Content = new StringContent("{\"attempt\":\"x\"}", Encoding.UTF8, "application/json") + }; + jsonRequest.Headers.Add("Cookie", $"{attempt.CookieName}={attempt.Cookie}"); + using var json = await client.SendAsync(jsonRequest); results.Add(("json body", new CompletionResult(json, false), "Heimdall completion has no attempt for this browser.")); using var malformed = await client.PostAsync( "/auth/heimdall/complete",