mirror of
https://github.com/bitwarden/server.git
synced 2025-05-28 23:04:50 -05:00
Fix tests
This commit is contained in:
parent
edc4b567ef
commit
b4618b31be
@ -5,6 +5,7 @@ using Bit.IntegrationTestCommon;
|
||||
using Bit.IntegrationTestCommon.Factories;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.AspNetCore.TestHost;
|
||||
using Xunit;
|
||||
|
||||
#nullable enable
|
||||
|
||||
@ -50,6 +51,10 @@ public class ApiApplicationFactory : WebApplicationFactoryBase<Startup>
|
||||
public async Task<(string Token, string RefreshToken)> LoginWithNewAccount(
|
||||
string email = "integration-test@bitwarden.com", string masterPasswordHash = "master_password_hash")
|
||||
{
|
||||
// This might be the first action in a test and since it forwards to the Identity server, we need to ensure that
|
||||
// this server is initialized since it's responsible for seeding the database.
|
||||
Assert.NotNull(Services);
|
||||
|
||||
await _identityApplicationFactory.RegisterNewIdentityFactoryUserAsync(
|
||||
new RegisterFinishRequestModel
|
||||
{
|
||||
|
@ -45,6 +45,10 @@ public class EventsApplicationFactory : WebApplicationFactoryBase<Startup>
|
||||
/// </summary>
|
||||
public async Task<(string Token, string RefreshToken)> LoginWithNewAccount(string email = "integration-test@bitwarden.com", string masterPasswordHash = "master_password_hash")
|
||||
{
|
||||
// This might be the first action in a test and since it forwards to the Identity server, we need to ensure that
|
||||
// this server is initialized since it's responsible for seeding the database.
|
||||
Assert.NotNull(Services);
|
||||
|
||||
await _identityApplicationFactory.RegisterNewIdentityFactoryUserAsync(
|
||||
new RegisterFinishRequestModel
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user