diff --git a/Api.SeaHavenIndustries.Tests/PasswordPolicyTests.cs b/Api.SeaHavenIndustries.Tests/PasswordPolicyTests.cs index 8183cf3..6e3a85e 100644 --- a/Api.SeaHavenIndustries.Tests/PasswordPolicyTests.cs +++ b/Api.SeaHavenIndustries.Tests/PasswordPolicyTests.cs @@ -133,7 +133,8 @@ public sealed class PasswordPolicyTests : IAsyncDisposable Microsoft.Extensions.Options.Options.Create(new JwtOptions { Secret = new string('x', 64) }), Mock.Of(), Mock.Of(), - Mock.Of(), + Mock.Of(), + new InMemoryPasswordResetThrottle(TimeProvider.System), TimeProvider.System); var result = await service.ChangePasswordAsync(user.Id, CurrentPassword, "Next2@x", CancellationToken.None); @@ -179,7 +180,7 @@ public sealed class PasswordPolicyTests : IAsyncDisposable Email = user.Email!, UserId = user.Id, CodeSalt = salt, - CodeHash = PasswordResetCodeSecrets.Hash(salt, "123456"), + CodeHash = PasswordResetCodeSecrets.Hash(PasswordResetCodeSecrets.DeriveKey(new string('x', 64)), salt, "123456"), ExpiresAtUtc = DateTime.UtcNow.AddMinutes(10) }); forget.Setup(f => f.TryConsumeAttemptAsync(7, It.IsAny(), It.IsAny(), It.IsAny())) @@ -220,7 +221,8 @@ public sealed class PasswordPolicyTests : IAsyncDisposable Microsoft.Extensions.Options.Options.Create(new JwtOptions { Secret = new string('x', 64) }), Mock.Of(), (forget ?? new Mock()).Object, - Mock.Of(), + Mock.Of(), + new InMemoryPasswordResetThrottle(TimeProvider.System), TimeProvider.System); public async ValueTask DisposeAsync()