mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-24 14:11:29 +00:00
Properly clean up users & slots in SlotTests and DatabaseTests
This commit is contained in:
parent
61f027b57e
commit
9479dca411
3 changed files with 17 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Tests
|
||||
{
|
||||
|
@ -11,8 +12,13 @@ namespace LBPUnion.ProjectLighthouse.Tests
|
|||
await using Database database = new();
|
||||
int rand = new Random().Next();
|
||||
|
||||
await database.CreateUser("createUserTwiceTest" + rand);
|
||||
await database.CreateUser("createUserTwiceTest" + rand);
|
||||
User userA = await database.CreateUser("createUserTwiceTest" + rand);
|
||||
User userB = await database.CreateUser("createUserTwiceTest" + rand);
|
||||
|
||||
database.Users.Remove(userA);
|
||||
database.Users.Remove(userB);
|
||||
|
||||
await database.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue