1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

Fix Most Test Warnings (#4612)

* Add Collections Tests

* Update CollectionRepository Implementation

* Test Adding And Deleting Through Replace

* Format

* Fix Most Test Warnings

* Format
This commit is contained in:
Justin Baur
2024-08-15 17:14:22 -04:00
committed by GitHub
parent 2096923853
commit aa34bbb0e6
18 changed files with 50 additions and 23 deletions

View File

@ -165,12 +165,15 @@ public class AuthRequestRepositoryTests
// Assert that the unchanged auth request is still unchanged
var skippedAuthRequest = await authRequestRepository.GetByIdAsync(authRequestNotToBeUpdated.Id);
Assert.NotNull(skippedAuthRequest);
Assert.True(AuthRequestEquals(skippedAuthRequest, authRequestNotToBeUpdated));
// Assert that the values updated on the changed auth requests were updated, and no others
var updatedAuthRequest1 = await authRequestRepository.GetByIdAsync(authRequestToBeUpdated1.Id);
Assert.NotNull(updatedAuthRequest1);
Assert.True(AuthRequestEquals(authRequestToBeUpdated1, updatedAuthRequest1));
var updatedAuthRequest2 = await authRequestRepository.GetByIdAsync(authRequestToBeUpdated2.Id);
Assert.NotNull(updatedAuthRequest2);
Assert.True(AuthRequestEquals(authRequestToBeUpdated2, updatedAuthRequest2));
// Assert that the auth request we never created is not created by

View File

@ -39,6 +39,7 @@ public class EmergencyAccessRepositoriesTests
var updatedGrantee = await userRepository.GetByIdAsync(granteeUser.Id);
Assert.NotNull(updatedGrantee);
Assert.NotEqual(updatedGrantee.AccountRevisionDate, granteeUser.AccountRevisionDate);
}
}