1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-12 13:19:01 -05:00

Merge branch 'master' into feature/flexible-collections

This commit is contained in:
Thomas Rittson
2023-10-13 15:51:44 +10:00
committed by GitHub
34 changed files with 2408 additions and 293 deletions

View File

@ -16,8 +16,7 @@ public class CipherRepositoryTests
[DatabaseTheory, DatabaseData]
public async Task DeleteAsync_UpdatesUserRevisionDate(
IUserRepository userRepository,
ICipherRepository cipherRepository,
ITestDatabaseHelper helper)
ICipherRepository cipherRepository)
{
var user = await userRepository.CreateAsync(new User
{
@ -34,8 +33,6 @@ public class CipherRepositoryTests
Data = "", // TODO: EF does not enforce this as NOT NULL
});
helper.ClearTracker();
await cipherRepository.DeleteAsync(cipher);
var deletedCipher = await cipherRepository.GetByIdAsync(cipher.Id);
@ -52,8 +49,7 @@ public class CipherRepositoryTests
IOrganizationUserRepository organizationUserRepository,
ICollectionRepository collectionRepository,
ICipherRepository cipherRepository,
ICollectionCipherRepository collectionCipherRepository,
ITestDatabaseHelper helper)
ICollectionCipherRepository collectionCipherRepository)
{
var user = await userRepository.CreateAsync(new User
{
@ -63,8 +59,6 @@ public class CipherRepositoryTests
SecurityStamp = "stamp",
});
helper.ClearTracker();
user = await userRepository.GetByIdAsync(user.Id);
var organization = await organizationRepository.CreateAsync(new Organization
@ -101,8 +95,6 @@ public class CipherRepositoryTests
},
});
helper.ClearTracker();
await Task.Delay(100);
await cipherRepository.CreateAsync(new CipherDetails
@ -129,8 +121,7 @@ public class CipherRepositoryTests
ICipherRepository cipherRepository,
IOrganizationRepository organizationRepository,
IOrganizationUserRepository organizationUserRepository,
IFolderRepository folderRepository,
ITestDatabaseHelper helper)
IFolderRepository folderRepository)
{
// This tests what happens when a cipher is moved into an organizations
var user = await userRepository.CreateAsync(new User
@ -172,8 +163,6 @@ public class CipherRepositoryTests
UserId = user.Id,
});
helper.ClearTracker();
// Move cipher to organization vault
await cipherRepository.ReplaceAsync(new CipherDetails
{