1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

Remove FlexibleCollections feature flag (#4481)

This commit is contained in:
Thomas Rittson
2024-07-24 09:03:09 +10:00
committed by GitHub
parent 903c412943
commit 28d45f91aa
23 changed files with 57 additions and 120 deletions

View File

@ -107,7 +107,7 @@ public class SyncControllerTests
.Returns(providerUserOrganizationDetails);
folderRepository.GetManyByUserIdAsync(user.Id).Returns(folders);
cipherRepository.GetManyByUserIdAsync(user.Id, useFlexibleCollections: Arg.Any<bool>()).Returns(ciphers);
cipherRepository.GetManyByUserIdAsync(user.Id).Returns(ciphers);
sendRepository
.GetManyByUserIdAsync(user.Id).Returns(sends);
@ -115,7 +115,7 @@ public class SyncControllerTests
policyRepository.GetManyByUserIdAsync(user.Id).Returns(policies);
// Returns for methods only called if we have enabled orgs
collectionRepository.GetManyByUserIdAsync(user.Id, Arg.Any<bool>()).Returns(collections);
collectionRepository.GetManyByUserIdAsync(user.Id).Returns(collections);
collectionCipherRepository.GetManyByUserIdAsync(user.Id).Returns(new List<CollectionCipher>());
// Back to standard test setup
userService.TwoFactorIsEnabledAsync(user).Returns(false);
@ -197,7 +197,7 @@ public class SyncControllerTests
.Returns(providerUserOrganizationDetails);
folderRepository.GetManyByUserIdAsync(user.Id).Returns(folders);
cipherRepository.GetManyByUserIdAsync(user.Id, useFlexibleCollections: Arg.Any<bool>()).Returns(ciphers);
cipherRepository.GetManyByUserIdAsync(user.Id).Returns(ciphers);
sendRepository
.GetManyByUserIdAsync(user.Id).Returns(sends);
@ -271,7 +271,7 @@ public class SyncControllerTests
.Returns(providerUserOrganizationDetails);
folderRepository.GetManyByUserIdAsync(user.Id).Returns(folders);
cipherRepository.GetManyByUserIdAsync(user.Id, useFlexibleCollections: Arg.Any<bool>()).Returns(ciphers);
cipherRepository.GetManyByUserIdAsync(user.Id).Returns(ciphers);
sendRepository
.GetManyByUserIdAsync(user.Id).Returns(sends);
@ -279,7 +279,7 @@ public class SyncControllerTests
policyRepository.GetManyByUserIdAsync(user.Id).Returns(policies);
// Returns for methods only called if we have enabled orgs
collectionRepository.GetManyByUserIdAsync(user.Id, Arg.Any<bool>()).Returns(collections);
collectionRepository.GetManyByUserIdAsync(user.Id).Returns(collections);
collectionCipherRepository.GetManyByUserIdAsync(user.Id).Returns(new List<CollectionCipher>());
// Back to standard test setup
userService.TwoFactorIsEnabledAsync(user).Returns(false);
@ -333,7 +333,7 @@ public class SyncControllerTests
.GetManyByUserIdAsync(default);
await cipherRepository.ReceivedWithAnyArgs(1)
.GetManyByUserIdAsync(default, useFlexibleCollections: default);
.GetManyByUserIdAsync(default);
await sendRepository.ReceivedWithAnyArgs(1)
.GetManyByUserIdAsync(default);
@ -342,7 +342,7 @@ public class SyncControllerTests
if (hasEnabledOrgs)
{
await collectionRepository.ReceivedWithAnyArgs(1)
.GetManyByUserIdAsync(default, default);
.GetManyByUserIdAsync(default);
await collectionCipherRepository.ReceivedWithAnyArgs(1)
.GetManyByUserIdAsync(default);
}
@ -350,7 +350,7 @@ public class SyncControllerTests
{
// all disabled orgs
await collectionRepository.ReceivedWithAnyArgs(0)
.GetManyByUserIdAsync(default, default);
.GetManyByUserIdAsync(default);
await collectionCipherRepository.ReceivedWithAnyArgs(0)
.GetManyByUserIdAsync(default);
}