mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-09-04 00:28:43 +00:00
Fix registration unit tests
This commit is contained in:
parent
37e6bb159e
commit
813ee8122f
1 changed files with 3 additions and 3 deletions
|
@ -18,7 +18,7 @@ public class RegisterTests : LighthouseWebTest
|
|||
{
|
||||
await using Database database = new();
|
||||
|
||||
string username = "unitTestUser" + new Random().Next();
|
||||
string username = ("unitTestUser" + new Random().Next()).Substring(0, 16);
|
||||
string password = HashHelper.Sha256Hash(HashHelper.GenerateRandomBytes(64).ToArray());
|
||||
|
||||
this.Driver.Navigate().GoToUrl(this.BaseAddress + "/register");
|
||||
|
@ -41,7 +41,7 @@ public class RegisterTests : LighthouseWebTest
|
|||
{
|
||||
await using Database database = new();
|
||||
|
||||
string username = "unitTestUser" + new Random().Next();
|
||||
string username = ("unitTestUser" + new Random().Next()).Substring(0, 16);
|
||||
string password = HashHelper.Sha256Hash(HashHelper.GenerateRandomBytes(64).ToArray());
|
||||
|
||||
this.Driver.Navigate().GoToUrl(this.BaseAddress + "/register");
|
||||
|
@ -62,7 +62,7 @@ public class RegisterTests : LighthouseWebTest
|
|||
{
|
||||
await using Database database = new();
|
||||
|
||||
string username = "unitTestUser" + new Random().Next();
|
||||
string username = ("unitTestUser" + new Random().Next()).Substring(0, 16);
|
||||
string password = HashHelper.Sha256Hash(HashHelper.GenerateRandomBytes(64).ToArray());
|
||||
|
||||
await database.CreateUser(username, HashHelper.BCryptHash(password));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue