Heimdall tests: an unreadable form with a genuine attempt cookie present is still no attempt
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
efb278a910
commit
d743e4f363
1 changed files with 6 additions and 3 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue