mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-01 09:48:37 +00:00
Fix ShouldOnlyShowUsersLevels test
This commit is contained in:
parent
e4bb16100d
commit
2d4dc14f93
1 changed files with 11 additions and 3 deletions
|
@ -17,13 +17,18 @@ namespace LBPUnion.ProjectLighthouse.Tests
|
||||||
User userA = await database.CreateUser("unitTestUser0");
|
User userA = await database.CreateUser("unitTestUser0");
|
||||||
User userB = await database.CreateUser("unitTestUser1");
|
User userB = await database.CreateUser("unitTestUser1");
|
||||||
|
|
||||||
Location l = new();
|
Location l = new()
|
||||||
|
{
|
||||||
|
X = 0,
|
||||||
|
Y = 0,
|
||||||
|
};
|
||||||
database.Locations.Add(l);
|
database.Locations.Add(l);
|
||||||
await database.SaveChangesAsync();
|
await database.SaveChangesAsync();
|
||||||
|
|
||||||
Slot slotA = new()
|
Slot slotA = new()
|
||||||
{
|
{
|
||||||
Creator = userA,
|
Creator = userA,
|
||||||
|
CreatorId = userA.UserId,
|
||||||
Name = "slotA",
|
Name = "slotA",
|
||||||
Location = l,
|
Location = l,
|
||||||
LocationId = l.Id,
|
LocationId = l.Id,
|
||||||
|
@ -33,6 +38,7 @@ namespace LBPUnion.ProjectLighthouse.Tests
|
||||||
Slot slotB = new()
|
Slot slotB = new()
|
||||||
{
|
{
|
||||||
Creator = userB,
|
Creator = userB,
|
||||||
|
CreatorId = userB.UserId,
|
||||||
Name = "slotB",
|
Name = "slotB",
|
||||||
Location = l,
|
Location = l,
|
||||||
LocationId = l.Id,
|
LocationId = l.Id,
|
||||||
|
@ -49,8 +55,10 @@ namespace LBPUnion.ProjectLighthouse.Tests
|
||||||
|
|
||||||
LoginResult loginResult = await this.Authenticate();
|
LoginResult loginResult = await this.Authenticate();
|
||||||
|
|
||||||
HttpResponseMessage respMessageA = await this.AuthenticatedRequest("LITTLEBIGPLANETPS3_XML/slots/by?u=unitTestUser0", loginResult.AuthTicket);
|
HttpResponseMessage respMessageA = await this.AuthenticatedRequest
|
||||||
HttpResponseMessage respMessageB = await this.AuthenticatedRequest("LITTLEBIGPLANETPS3_XML/slots/by?u=unitTestUser1", loginResult.AuthTicket);
|
("LITTLEBIGPLANETPS3_XML/slots/by?u=unitTestUser0&pageStart=1&pageSize=1", loginResult.AuthTicket);
|
||||||
|
HttpResponseMessage respMessageB = await this.AuthenticatedRequest
|
||||||
|
("LITTLEBIGPLANETPS3_XML/slots/by?u=unitTestUser1&pageStart=1&pageSize=1", loginResult.AuthTicket);
|
||||||
|
|
||||||
Assert.True(respMessageA.IsSuccessStatusCode);
|
Assert.True(respMessageA.IsSuccessStatusCode);
|
||||||
Assert.True(respMessageB.IsSuccessStatusCode);
|
Assert.True(respMessageB.IsSuccessStatusCode);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue