1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 05:00:19 -05:00

Fix tests

This commit is contained in:
Bernd Schoolmann 2025-03-18 13:50:17 +01:00
parent ff83735b20
commit a0c4c0e079
No known key found for this signature in database

View File

@ -3,6 +3,7 @@ using System.Text;
using Bit.Core; using Bit.Core;
using Bit.Core.Auth.Models.Api.Request.Accounts; using Bit.Core.Auth.Models.Api.Request.Accounts;
using Bit.Core.Auth.Models.Business.Tokenables; using Bit.Core.Auth.Models.Business.Tokenables;
using Bit.Core.Auth.Repositories;
using Bit.Core.Auth.Services; using Bit.Core.Auth.Services;
using Bit.Core.Auth.UserFeatures.Registration; using Bit.Core.Auth.UserFeatures.Registration;
using Bit.Core.Auth.UserFeatures.WebAuthnLogin; using Bit.Core.Auth.UserFeatures.WebAuthnLogin;
@ -45,6 +46,7 @@ public class AccountsControllerTests : IDisposable
private readonly IReferenceEventService _referenceEventService; private readonly IReferenceEventService _referenceEventService;
private readonly IFeatureService _featureService; private readonly IFeatureService _featureService;
private readonly IDataProtectorTokenFactory<RegistrationEmailVerificationTokenable> _registrationEmailVerificationTokenDataFactory; private readonly IDataProtectorTokenFactory<RegistrationEmailVerificationTokenable> _registrationEmailVerificationTokenDataFactory;
private readonly IOpaqueKeyExchangeCredentialRepository _opaqueKeyExchangeCredentialRepository;
private readonly GlobalSettings _globalSettings; private readonly GlobalSettings _globalSettings;
@ -61,6 +63,7 @@ public class AccountsControllerTests : IDisposable
_referenceEventService = Substitute.For<IReferenceEventService>(); _referenceEventService = Substitute.For<IReferenceEventService>();
_featureService = Substitute.For<IFeatureService>(); _featureService = Substitute.For<IFeatureService>();
_registrationEmailVerificationTokenDataFactory = Substitute.For<IDataProtectorTokenFactory<RegistrationEmailVerificationTokenable>>(); _registrationEmailVerificationTokenDataFactory = Substitute.For<IDataProtectorTokenFactory<RegistrationEmailVerificationTokenable>>();
_opaqueKeyExchangeCredentialRepository = Substitute.For<IOpaqueKeyExchangeCredentialRepository>();
_globalSettings = Substitute.For<GlobalSettings>(); _globalSettings = Substitute.For<GlobalSettings>();
_sut = new AccountsController( _sut = new AccountsController(
@ -75,6 +78,7 @@ public class AccountsControllerTests : IDisposable
_referenceEventService, _referenceEventService,
_featureService, _featureService,
_registrationEmailVerificationTokenDataFactory, _registrationEmailVerificationTokenDataFactory,
_opaqueKeyExchangeCredentialRepository,
_globalSettings _globalSettings
); );
} }