Skip to content

Commit c3cead9

Browse files
committed
Commented or fixed management API integration tests verifying permissions where we were asserting on an error response.
1 parent f3ed30f commit c3cead9

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

tests/Umbraco.Tests.Integration/ManagementApi/HealthCheck/ExecuteActionHealthCheckControllerTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public async Task Setup()
2727

2828
protected override UserGroupAssertionModel AdminUserGroupAssertionModel => new()
2929
{
30-
ExpectedStatusCode = HttpStatusCode.InternalServerError
30+
ExpectedStatusCode = HttpStatusCode.OK
3131
};
3232

3333
protected override UserGroupAssertionModel EditorUserGroupAssertionModel => new()
@@ -58,7 +58,7 @@ public async Task Setup()
5858
protected override async Task<HttpResponseMessage> ClientRequest()
5959
{
6060
HealthCheckActionRequestModel healthCheckActionRequest =
61-
new() { HealthCheck = new ReferenceByIdModel(_dataIntegrityHealthCheckId), ValueRequired = false };
61+
new() { HealthCheck = new ReferenceByIdModel(_dataIntegrityHealthCheckId), ValueRequired = false, Alias = "fixContentPaths" };
6262
return await Client.PostAsync(Url, JsonContent.Create(healthCheckActionRequest));
6363
}
6464
}

tests/Umbraco.Tests.Integration/ManagementApi/LogViewer/AllLogViewerControllerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class AllLogViewerControllerTests : ManagementApiUserGroupTestBase<AllLog
1212
// We get the InternalServerError for the admin because it has access, but there is no log file to view
1313
protected override UserGroupAssertionModel AdminUserGroupAssertionModel => new()
1414
{
15-
ExpectedStatusCode = HttpStatusCode.InternalServerError
15+
ExpectedStatusCode = HttpStatusCode.OK
1616
};
1717

1818
protected override UserGroupAssertionModel EditorUserGroupAssertionModel => new()

tests/Umbraco.Tests.Integration/ManagementApi/LogViewer/AllMessageTemplateLogViewerControllerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class AllMessageTemplateLogViewerControllerTests : ManagementApiUserGroup
1111
// We get the InternalServerError for the admin because it has access, but there is no log file to view
1212
protected override UserGroupAssertionModel AdminUserGroupAssertionModel => new()
1313
{
14-
ExpectedStatusCode = HttpStatusCode.InternalServerError
14+
ExpectedStatusCode = HttpStatusCode.OK
1515
};
1616

1717
protected override UserGroupAssertionModel EditorUserGroupAssertionModel => new()

tests/Umbraco.Tests.Integration/ManagementApi/LogViewer/LogLevelCountLogViewerControllerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class LogLevelCountLogViewerControllerTests : ManagementApiUserGroupTestB
1111
// We get the InternalServerError for the admin because it has access, but there is no log file to view
1212
protected override UserGroupAssertionModel AdminUserGroupAssertionModel => new()
1313
{
14-
ExpectedStatusCode = HttpStatusCode.InternalServerError
14+
ExpectedStatusCode = HttpStatusCode.OK
1515
};
1616

1717
protected override UserGroupAssertionModel EditorUserGroupAssertionModel => new()

tests/Umbraco.Tests.Integration/ManagementApi/LogViewer/ValidateLogFileSizeLogViewerControllerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class ValidateLogFileSizeLogViewerControllerTests: ManagementApiUserGroup
1111
// We get the InternalServerError for the admin because it has access, but there is no log file to view
1212
protected override UserGroupAssertionModel AdminUserGroupAssertionModel => new()
1313
{
14-
ExpectedStatusCode = HttpStatusCode.InternalServerError
14+
ExpectedStatusCode = HttpStatusCode.OK
1515
};
1616

1717
protected override UserGroupAssertionModel EditorUserGroupAssertionModel => new()

tests/Umbraco.Tests.Integration/ManagementApi/User/InviteUserControllerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public async Task SetUp()
2727

2828
protected override UserGroupAssertionModel AdminUserGroupAssertionModel => new()
2929
{
30-
ExpectedStatusCode = HttpStatusCode.InternalServerError,
30+
ExpectedStatusCode = HttpStatusCode.InternalServerError, // We expect an error here because email sending is not configured in these tests.
3131
};
3232

3333
protected override UserGroupAssertionModel EditorUserGroupAssertionModel => new()

0 commit comments

Comments
 (0)