From 42ee811a63a214b0dbf3c004e165e0b950b31ab4 Mon Sep 17 00:00:00 2001 From: martincostello Date: Tue, 10 Oct 2023 15:26:08 +0100 Subject: [PATCH] Fix tests Fix tests after update to Wilson 7.0.0. --- .../Apple/AppleClientSecretGeneratorTests.cs | 2 +- test/AspNet.Security.OAuth.Providers.Tests/Apple/AppleTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/AspNet.Security.OAuth.Providers.Tests/Apple/AppleClientSecretGeneratorTests.cs b/test/AspNet.Security.OAuth.Providers.Tests/Apple/AppleClientSecretGeneratorTests.cs index 47646303e..2dd03c8a5 100644 --- a/test/AspNet.Security.OAuth.Providers.Tests/Apple/AppleClientSecretGeneratorTests.cs +++ b/test/AspNet.Security.OAuth.Providers.Tests/Apple/AppleClientSecretGeneratorTests.cs @@ -79,7 +79,7 @@ await GenerateTokenAsync(Configure, async (context) => Case.Sensitive, "JWT payload contains unexpected additional claims."); - securityToken.Payload.IssuedAt.ShouldBeGreaterThanOrEqualTo(utcNow.UtcDateTime); + securityToken.Payload.IssuedAt.ShouldBeGreaterThanOrEqualTo(utcNow.UtcDateTime.AddSeconds(-utcNow.Second)); ((long)securityToken.Payload.Expiration!.Value).ShouldBeGreaterThanOrEqualTo(utcNow.AddSeconds(60).ToUnixTimeSeconds()); ((long)securityToken.Payload.Expiration.Value).ShouldBeLessThanOrEqualTo(utcNow.AddSeconds(70).ToUnixTimeSeconds()); }); diff --git a/test/AspNet.Security.OAuth.Providers.Tests/Apple/AppleTests.cs b/test/AspNet.Security.OAuth.Providers.Tests/Apple/AppleTests.cs index b6ce0c853..15ffbe8b2 100644 --- a/test/AspNet.Security.OAuth.Providers.Tests/Apple/AppleTests.cs +++ b/test/AspNet.Security.OAuth.Providers.Tests/Apple/AppleTests.cs @@ -251,7 +251,7 @@ static void ConfigureServices(IServiceCollection services) // Assert exception.InnerException.ShouldNotBeNull(); exception.InnerException.ShouldBeOfType(); - exception.InnerException.InnerException.ShouldBeOfType(); + exception.InnerException.InnerException.ShouldBeOfType(); exception.InnerException.InnerException!.Message.ShouldNotBeNull(); exception.InnerException.InnerException.Message.ShouldStartWith("IDX"); }