23 lines
551 B
C#
23 lines
551 B
C#
using MyOffice.Web.Auth;
|
|
|
|
namespace MyOffice.Tests.Auth;
|
|
|
|
public class OpenIddictRedirectUriTests
|
|
{
|
|
[Fact]
|
|
public void BuildRedirectUri_uses_localhost_when_host_empty()
|
|
{
|
|
var uri = OpenIddictSeeder.BuildRedirectUri(null);
|
|
|
|
Assert.Equal("http://localhost:4300/silent-refresh.html", uri.ToString());
|
|
}
|
|
|
|
[Fact]
|
|
public void BuildRedirectUri_appends_silent_refresh_and_trims_slash()
|
|
{
|
|
var uri = OpenIddictSeeder.BuildRedirectUri("https://app.example.com/");
|
|
|
|
Assert.Equal("https://app.example.com/silent-refresh.html", uri.ToString());
|
|
}
|
|
}
|