The analyser missed this one

This commit is contained in:
Damian Hickey 2025-10-13 20:16:48 +02:00
parent bbf40cd2e8
commit c71bfa2283

View file

@ -13,12 +13,11 @@ namespace UnitTests.Endpoints.Results;
public class EndSessionCallbackResultTests
{
private EndSessionCallbackHttpWriter _subject;
private EndSessionCallbackValidationResult _result = new EndSessionCallbackValidationResult();
private IdentityServerOptions _options = TestIdentityServerOptions.Create();
private DefaultHttpContext _context = new DefaultHttpContext();
private readonly CancellationToken _ct = TestContext.Current.CancellationToken;
private readonly EndSessionCallbackHttpWriter _subject;
private readonly EndSessionCallbackValidationResult _result = new EndSessionCallbackValidationResult();
private readonly IdentityServerOptions _options = TestIdentityServerOptions.Create();
private readonly DefaultHttpContext _context = new DefaultHttpContext();
public EndSessionCallbackResultTests()
{
@ -59,7 +58,7 @@ public class EndSessionCallbackResultTests
_context.Response.Headers["X-Content-Security-Policy"].First().ShouldContain("frame-src http://foo.com http://bar.com");
_context.Response.Body.Seek(0, SeekOrigin.Begin);
using var rdr = new StreamReader(_context.Response.Body);
var html = await rdr.ReadToEndAsync();
var html = await rdr.ReadToEndAsync(_ct);
html.ShouldContain("<iframe loading='eager' allow='' src='http://foo.com'></iframe>");
html.ShouldContain("<iframe loading='eager' allow='' src='http://bar.com'></iframe>");
}