-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix tfp double up in legacy b2c domains (#796)
* check for tfp * add more tests * fix null ref in test
- Loading branch information
Showing
6 changed files
with
109 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
tests/Microsoft.Identity.Web.Test.Common/Mocks/MockHttpContextAccessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using Microsoft.AspNetCore.Http; | ||
using NSubstitute; | ||
|
||
namespace Microsoft.Identity.Web.Test.Common.Mocks | ||
{ | ||
public static class MockHttpContextAccessor | ||
{ | ||
public static IHttpContextAccessor CreateMockHttpContextAccessor() | ||
{ | ||
var mockHttpContextAccessor = Substitute.For<IHttpContextAccessor>(); | ||
mockHttpContextAccessor.HttpContext = new DefaultHttpContext(); | ||
mockHttpContextAccessor.HttpContext.Request.Scheme = "https"; | ||
mockHttpContextAccessor.HttpContext.Request.Host = new HostString("IdentityDotNetSDKAutomation"); | ||
mockHttpContextAccessor.HttpContext.Request.PathBase = "/"; | ||
|
||
return mockHttpContextAccessor; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters