Skip to content

Commit 4593c79

Browse files
hhvrcCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent d04df20 commit 4593c79

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

API.IntegrationTests/Tests/AccountAuthenticatedTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public async Task ChangePassword_Success()
4040
}
4141

4242
[Test]
43-
public async Task ChangePassword_WrongCurrentPassword_Returns401()
43+
public async Task ChangePassword_WrongCurrentPassword_Returns403()
4444
{
4545
var user = await TestHelper.CreateAndLoginUser(WebApplicationFactory, "chgpwdbad", "chgpwdbad@test.org", "CorrectPassword123#");
4646
using var client = TestHelper.CreateAuthenticatedClient(WebApplicationFactory, user.SessionToken);

API.IntegrationTests/Tests/DeviceEndpointTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public async Task GetDeviceSelf_ReturnsDeviceInfo()
3838
}
3939

4040
[Test]
41-
public async Task GetDeviceSelf_WithShockers_ReturnsShokerList()
41+
public async Task GetDeviceSelf_WithShockers_ReturnsShockerList()
4242
{
4343
var userId = await TestHelper.CreateUserInDb(WebApplicationFactory, "hubshockers", "hubshockers@test.org", "SecurePassword123#");
4444
var (deviceId, hubToken) = await TestHelper.CreateDeviceInDb(WebApplicationFactory, userId, "HubWithShockers");

API.IntegrationTests/Tests/PublicTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ public async Task CheckUsername_Available_ReturnsAvailable()
5656
{
5757
using var client = WebApplicationFactory.CreateClient();
5858

59-
var response = await client.PostAsync("/1/account/username/check",
60-
new StringContent(
61-
JsonSerializer.Serialize(new { username = "totallyuniquename123" }),
62-
System.Text.Encoding.UTF8,
63-
"application/json"));
59+
using var content = new StringContent(
60+
JsonSerializer.Serialize(new { username = "totallyuniquename123" }),
61+
System.Text.Encoding.UTF8,
62+
"application/json");
6463

64+
var response = await client.PostAsync("/1/account/username/check", content);
6565
await Assert.That(response.StatusCode).IsEqualTo(HttpStatusCode.OK);
6666

6767
var json = await response.Content.ReadAsStringAsync();

0 commit comments

Comments
 (0)