Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec committed Oct 9, 2023
1 parent 5f02032 commit d775f95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Backend.Tests/Mocks/PermissionServiceMock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ public bool IsCurrentUserAuthorized(HttpContext? request)
/// to support unit testing when `HttpContext`s are not available.
/// </param>
/// <param name="permission"> Same as the real implementation. </param>
/// <param name="projectId"> Same as the real implementation. </param>
/// </summary>
public Task<bool> HasProjectPermission(HttpContext? request, Permission permission)
public Task<bool> HasProjectPermission(HttpContext? request, Permission permission, string projectId)
{
return Task.FromResult(IsAuthorizedHttpContext(request));
}
Expand Down
2 changes: 1 addition & 1 deletion Backend.Tests/Services/PermissionServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit d775f95

Please sign in to comment.