mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
[AC-1330] [AC-1850] Deprecate AccessAll in UserCollectionDetails and related sprocs (#3505)
This commit is contained in:
@ -115,9 +115,8 @@ public class SyncControllerTests
|
||||
policyRepository.GetManyByUserIdAsync(user.Id).Returns(policies);
|
||||
|
||||
// Returns for methods only called if we have enabled orgs
|
||||
collectionRepository.GetManyByUserIdAsync(user.Id).Returns(collections);
|
||||
collectionRepository.GetManyByUserIdAsync(user.Id, Arg.Any<bool>()).Returns(collections);
|
||||
collectionCipherRepository.GetManyByUserIdAsync(user.Id, Arg.Any<bool>()).Returns(new List<CollectionCipher>());
|
||||
|
||||
// Back to standard test setup
|
||||
userService.TwoFactorIsEnabledAsync(user).Returns(false);
|
||||
userService.HasPremiumFromOrganization(user).Returns(false);
|
||||
@ -280,9 +279,8 @@ public class SyncControllerTests
|
||||
policyRepository.GetManyByUserIdAsync(user.Id).Returns(policies);
|
||||
|
||||
// Returns for methods only called if we have enabled orgs
|
||||
collectionRepository.GetManyByUserIdAsync(user.Id).Returns(collections);
|
||||
collectionRepository.GetManyByUserIdAsync(user.Id, Arg.Any<bool>()).Returns(collections);
|
||||
collectionCipherRepository.GetManyByUserIdAsync(user.Id, Arg.Any<bool>()).Returns(new List<CollectionCipher>());
|
||||
|
||||
// Back to standard test setup
|
||||
userService.TwoFactorIsEnabledAsync(user).Returns(false);
|
||||
userService.HasPremiumFromOrganization(user).Returns(false);
|
||||
@ -344,7 +342,7 @@ public class SyncControllerTests
|
||||
if (hasEnabledOrgs)
|
||||
{
|
||||
await collectionRepository.ReceivedWithAnyArgs(1)
|
||||
.GetManyByUserIdAsync(default);
|
||||
.GetManyByUserIdAsync(default, default);
|
||||
await collectionCipherRepository.ReceivedWithAnyArgs(1)
|
||||
.GetManyByUserIdAsync(default, default);
|
||||
}
|
||||
@ -352,7 +350,7 @@ public class SyncControllerTests
|
||||
{
|
||||
// all disabled orgs
|
||||
await collectionRepository.ReceivedWithAnyArgs(0)
|
||||
.GetManyByUserIdAsync(default);
|
||||
.GetManyByUserIdAsync(default, default);
|
||||
await collectionCipherRepository.ReceivedWithAnyArgs(0)
|
||||
.GetManyByUserIdAsync(default, default);
|
||||
}
|
||||
|
Reference in New Issue
Block a user