1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

Turn on file scoped namespaces (#2225)

This commit is contained in:
Justin Baur
2022-08-29 14:53:16 -04:00
committed by GitHub
parent 7c4521e0b4
commit 34fb4cca2a
1206 changed files with 73816 additions and 75022 deletions

View File

@ -3,33 +3,32 @@ using Bit.IntegrationTestCommon.Factories;
using Microsoft.EntityFrameworkCore;
using Xunit;
namespace Bit.Identity.IntegrationTest.Controllers
namespace Bit.Identity.IntegrationTest.Controllers;
public class AccountsControllerTests : IClassFixture<IdentityApplicationFactory>
{
public class AccountsControllerTests : IClassFixture<IdentityApplicationFactory>
private readonly IdentityApplicationFactory _factory;
public AccountsControllerTests(IdentityApplicationFactory factory)
{
private readonly IdentityApplicationFactory _factory;
_factory = factory;
}
public AccountsControllerTests(IdentityApplicationFactory factory)
[Fact]
public async Task PostRegister_Success()
{
var context = await _factory.RegisterAsync(new RegisterRequestModel
{
_factory = factory;
}
Email = "test+register@email.com",
MasterPasswordHash = "master_password_hash"
});
[Fact]
public async Task PostRegister_Success()
{
var context = await _factory.RegisterAsync(new RegisterRequestModel
{
Email = "test+register@email.com",
MasterPasswordHash = "master_password_hash"
});
Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode);
var database = _factory.GetDatabaseContext();
var user = await database.Users
.SingleAsync(u => u.Email == "test+register@email.com");
var database = _factory.GetDatabaseContext();
var user = await database.Users
.SingleAsync(u => u.Email == "test+register@email.com");
Assert.NotNull(user);
}
Assert.NotNull(user);
}
}