test(auth): format the password change request

This commit is contained in:
Alexandre Brandizzi 2026-09-25 19:10:46 -03:00
parent b7be07411e
commit cc46950254

View file

@ -39,12 +39,13 @@ public sealed class SessionRevocationTests
var other = await host.SignInAsync("sam@example.com");
await AssertAcceptedAsync(host, other);
using (var changed = await host.SendAsync(HttpMethod.Post, "api/Authentication/ChangePassword", before, new
var change = new
{
currentpassword = SessionTestHost.Password,
newpassword = NewPassword,
confirmpassword = NewPassword
}))
};
using (var changed = await host.SendAsync(HttpMethod.Post, "api/Authentication/ChangePassword", before, change))
Assert.Equal(HttpStatusCode.OK, changed.StatusCode);
await AssertRefusedAsync(host, before);