mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-01 18:57:24 +00:00
Fixes integration test fixtures disposing the shared web factory per test.
This commit is contained in:
1 parent
1189bbaf36
commit
cbe27ab22e
48 files changed
+112
-117
No files matched your search
+30
@@ -164,9 +164,39 @@ public class AuthenticatedLuminaApiFactory : LuminaApiFactory, IDisposable
|
||||
return user;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes the currently created test user from the database.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Test classes must call this in their per-test <c>DisposeAsync</c> instead of <see cref="Dispose"/>. The
|
||||
/// factory is a shared <see cref="IClassFixture{TFixture}"/>, created once per test class and disposed by
|
||||
/// xUnit only after all tests in the class have run. Calling <see cref="Dispose"/> from a per-test
|
||||
/// <c>DisposeAsync</c> would dispose the web host and its service provider after the first test, making
|
||||
/// every subsequent test in the class fail with an <see cref="ObjectDisposedException"/> when it resolves
|
||||
/// services. <see cref="Dispose"/> is therefore reserved for xUnit's own class-teardown and must never be
|
||||
/// invoked from a test.
|
||||
/// </remarks>
|
||||
/// <returns>A task representing the asynchronous operation.</returns>
|
||||
public async Task RemoveTestUserAsync()
|
||||
{
|
||||
using IServiceScope scope = Services.CreateScope();
|
||||
LuminaDbContext dbContext = scope.ServiceProvider.GetRequiredService<LuminaDbContext>();
|
||||
|
||||
UserEntity? user = dbContext.Users.FirstOrDefault(u => u.Username == TestUsername);
|
||||
if (user is not null)
|
||||
{
|
||||
dbContext.Users.Remove(user);
|
||||
await dbContext.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Called by xUnit when the test class completes. Do not call from tests; per-test cleanup must use
|
||||
/// <see cref="RemoveTestUserAsync"/>. See that method for the details.
|
||||
/// </remarks>
|
||||
public new void Dispose()
|
||||
{
|
||||
using IServiceScope scope = Services.CreateScope();
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@ public class GetPermissionsEndpointTests : IClassFixture<AuthenticatedLuminaApiF
|
||||
/// </summary>
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
|
||||
using IServiceScope scope = _apiFactory.Services.CreateScope();
|
||||
LuminaDbContext dbContext = scope.ServiceProvider.GetRequiredService<LuminaDbContext>();
|
||||
|
||||
+1
-1
@@ -182,6 +182,6 @@ public class AddRoleEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory>
|
||||
|
||||
await dbContext.SaveChangesAsync();
|
||||
|
||||
_apiFactory.Dispose();
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -192,6 +192,6 @@ public class DeleteRoleEndpointTests : IClassFixture<AuthenticatedLuminaApiFacto
|
||||
|
||||
await dbContext.SaveChangesAsync();
|
||||
|
||||
_apiFactory.Dispose();
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -172,6 +172,6 @@ public class GetRolePermissionsEndpointTests : IClassFixture<AuthenticatedLumina
|
||||
|
||||
await dbContext.SaveChangesAsync();
|
||||
|
||||
_apiFactory.Dispose();
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -130,6 +130,6 @@ public class GetRolesEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory
|
||||
|
||||
await dbContext.SaveChangesAsync();
|
||||
|
||||
_apiFactory.Dispose();
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -198,6 +198,6 @@ public class UpdateRoleEndpointTests : IClassFixture<AuthenticatedLuminaApiFacto
|
||||
|
||||
await dbContext.SaveChangesAsync();
|
||||
|
||||
_apiFactory.Dispose();
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -215,9 +215,8 @@ public class GetDirectoriesEndpointTests : IClassFixture<AuthenticatedLuminaApiF
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -42,10 +42,9 @@ public class GetDrivesEndpointTests : IClassFixture<AuthenticatedLuminaApiFactor
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
+2
-3
@@ -99,9 +99,8 @@ public class GetTypeEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory>
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -256,9 +256,8 @@ public class GetFilesEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -256,9 +256,8 @@ public class GetTreeFilesEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -147,9 +147,8 @@ public class CheckPathExistsEndpointTests : IClassFixture<AuthenticatedLuminaApi
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -134,9 +134,8 @@ public class CombinePathEndpointTests : IClassFixture<AuthenticatedLuminaApiFact
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -205,9 +205,8 @@ public class GetPathParentEndpointTests : IClassFixture<AuthenticatedLuminaApiFa
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -162,9 +162,8 @@ public class GetPathRootEndpointTests : IClassFixture<AuthenticatedLuminaApiFact
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -113,9 +113,8 @@ public class GetPathSeparatorEndpointTests : IClassFixture<AuthenticatedLuminaAp
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -149,9 +149,8 @@ public class SplitPathEndpointTests : IClassFixture<AuthenticatedLuminaApiFactor
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -132,9 +132,8 @@ public class ValidatePathEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -170,9 +170,8 @@ public class GetThumbnailEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -143,6 +143,6 @@ public class AddLibraryEndpointTests : IClassFixture<AuthenticatedLuminaApiFacto
|
||||
|
||||
await dbContext.SaveChangesAsync();
|
||||
|
||||
_apiFactory.Dispose();
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -52,9 +52,8 @@ public class CancelLibrariesScanEndpointTests : IClassFixture<AuthenticatedLumin
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -81,9 +81,8 @@ public class CancelLibraryScanEndpointTests : IClassFixture<AuthenticatedLuminaA
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -188,9 +188,8 @@ public class DeleteLibraryEndpointTests : IClassFixture<AuthenticatedLuminaApiFa
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -131,9 +131,8 @@ public class GetEnabledLibrariesEndpointTests : IClassFixture<AuthenticatedLumin
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -155,9 +155,8 @@ public class GetLibrariesEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -138,9 +138,8 @@ public class GetLibraryEndpointTests : IClassFixture<AuthenticatedLuminaApiFacto
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -143,9 +143,8 @@ public class GetLibraryScanProgressEndpointTests : IClassFixture<AuthenticatedLu
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -63,9 +63,8 @@ public class GetRunningLibraryScansEndpointTests : IClassFixture<AuthenticatedLu
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -127,9 +127,8 @@ public class ScanLibrariesEndpointTests : IClassFixture<AuthenticatedLuminaApiFa
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -167,9 +167,8 @@ public class ScanLibraryEndpointTests : IClassFixture<AuthenticatedLuminaApiFact
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -171,9 +171,8 @@ public class UpdateLibraryEndpointTests : IClassFixture<AuthenticatedLuminaApiFa
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -1616,9 +1616,8 @@ public class AddBookEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory>
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -53,9 +53,8 @@ public class GetBookEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory>
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -352,9 +352,8 @@ public class GetBooksEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -402,9 +402,8 @@ public class GetBooksLiteEndpointTests : IClassFixture<AuthenticatedLuminaApiFac
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -137,9 +137,8 @@ public class CheckInitializationEndpointTests : IClassFixture<AuthenticatedLumin
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -49,9 +49,8 @@ public class CheckHealthEndpointTests : IClassFixture<AuthenticatedLuminaApiFact
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -146,9 +146,8 @@ public class GetLibraryMetadataProvidersEndpointTests : IClassFixture<Authentica
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -138,9 +138,8 @@ public class GetPluginSettingsEndpointTests : IClassFixture<AuthenticatedLuminaA
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -140,6 +140,6 @@ public class GetPluginsEndpointTests : IClassFixture<AuthenticatedLuminaApiFacto
|
||||
dbContext.Plugins.Remove(plugin);
|
||||
}
|
||||
await dbContext.SaveChangesAsync();
|
||||
_apiFactory.Dispose();
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -124,9 +124,8 @@ public class ReorderLibraryMetadataProvidersEndpointTests : IClassFixture<Authen
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -154,9 +154,8 @@ public class SetLibraryMetadataProviderEnabledEndpointTests : IClassFixture<Auth
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -151,9 +151,8 @@ public class UpdatePluginSettingsEndpointTests : IClassFixture<AuthenticatedLumi
|
||||
/// <summary>
|
||||
/// Disposes API factory resources.
|
||||
/// </summary>
|
||||
public Task DisposeAsync()
|
||||
public async Task DisposeAsync()
|
||||
{
|
||||
_apiFactory.Dispose();
|
||||
return Task.CompletedTask;
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -134,6 +134,6 @@ public class GetUsersEndpointTests : IClassFixture<AuthenticatedLuminaApiFactory
|
||||
|
||||
await dbContext.SaveChangesAsync();
|
||||
|
||||
_apiFactory.Dispose();
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -186,6 +186,6 @@ public class GetUserPermissionsEndpointTests : IClassFixture<AuthenticatedLumina
|
||||
|
||||
await dbContext.SaveChangesAsync();
|
||||
|
||||
_apiFactory.Dispose();
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -167,6 +167,6 @@ public class GetUserRoleEndpointTests : IClassFixture<AuthenticatedLuminaApiFact
|
||||
|
||||
await dbContext.SaveChangesAsync();
|
||||
|
||||
_apiFactory.Dispose();
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -255,6 +255,6 @@ public class UpdateUserRoleAndPermissionsEndpointTests : IClassFixture<Authentic
|
||||
|
||||
await dbContext.SaveChangesAsync();
|
||||
|
||||
_apiFactory.Dispose();
|
||||
await _apiFactory.RemoveTestUserAsync();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user