From d775f9502086bd7434f3bde1d0b5b5bd5f1d0716 Mon Sep 17 00:00:00 2001 From: Danny Rorabaugh Date: Mon, 9 Oct 2023 14:51:47 -0400 Subject: [PATCH] Fix tests --- Backend.Tests/Mocks/PermissionServiceMock.cs | 3 ++- Backend.Tests/Services/PermissionServiceTests.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Backend.Tests/Mocks/PermissionServiceMock.cs b/Backend.Tests/Mocks/PermissionServiceMock.cs index bd25b4795f..5db55cdeea 100644 --- a/Backend.Tests/Mocks/PermissionServiceMock.cs +++ b/Backend.Tests/Mocks/PermissionServiceMock.cs @@ -85,8 +85,9 @@ public bool IsCurrentUserAuthorized(HttpContext? request) /// to support unit testing when `HttpContext`s are not available. /// /// Same as the real implementation. + /// Same as the real implementation. /// - public Task HasProjectPermission(HttpContext? request, Permission permission) + public Task HasProjectPermission(HttpContext? request, Permission permission, string projectId) { return Task.FromResult(IsAuthorizedHttpContext(request)); } diff --git a/Backend.Tests/Services/PermissionServiceTests.cs b/Backend.Tests/Services/PermissionServiceTests.cs index 28a96af724..8a1bd6ffd8 100644 --- a/Backend.Tests/Services/PermissionServiceTests.cs +++ b/Backend.Tests/Services/PermissionServiceTests.cs @@ -86,7 +86,7 @@ public void IsSiteAdminTestTrue() public void HasProjectPermissionTestAdmin() { var httpContext = createHttpContextWithUser(new User { IsAdmin = true }); - Assert.That(_permService.HasProjectPermission(httpContext, Permission.Archive).Result, Is.True); + Assert.That(_permService.HasProjectPermission(httpContext, Permission.Archive, "ProjId").Result, Is.True); } [Test]