add ChangeUserInformation UT
continuous-integration/drone/push Build is passing Details

master
maxime 1 year ago
parent ecd9028d04
commit 107c9f5282

@ -71,7 +71,7 @@ public class TacticsControllerTest
{
var (controller, context) = GetController(1);
var result = await controller.CreateNew(new("Test Tactic", "pLaIn"));
result.Should().BeEquivalentTo(new TacticController.CreateNewResponse(2, 4));
result.Should().BeEquivalentTo(new TacticController.CreateNewResponse(2, 2));
var tactic = await context.Tactics.FirstOrDefaultAsync(e => e.Id == 2);
tactic.Should().NotBeNull();
tactic!.Name.Should().BeEquivalentTo("Test Tactic");

@ -83,4 +83,13 @@ public class UsersControllerTest
result.Should().BeOfType<OkResult>();
}
[Fact]
public async Task TestChangeUserInformation()
{
var controller = GetUserController(1);
await controller.ChangeUserInformation(new("a", "b", "c", "d"));
var user = await controller.GetUser();
user.Should().BeEquivalentTo(new User(1, "b", "a", "c", true));
}
}
Loading…
Cancel
Save