mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
[AC-1110] add deleteAnyCollection permission to bulk delete (#2766)
* [AC-1110] add deleteAnyCollection permission to bulk delete * [AC-1110] call collection service instead of repo for user collections * [AC-1110] fix tests * [AC-1110] fix more tests
This commit is contained in:
@ -148,7 +148,7 @@ public class CollectionsControllerTests
|
||||
OrganizationId = orgId.ToString()
|
||||
};
|
||||
|
||||
var collections = new List<CollectionDetails>
|
||||
var collections = new List<Collection>
|
||||
{
|
||||
new CollectionDetails
|
||||
{
|
||||
@ -170,8 +170,8 @@ public class CollectionsControllerTests
|
||||
.UserId
|
||||
.Returns(user.Id);
|
||||
|
||||
sutProvider.GetDependency<ICollectionRepository>()
|
||||
.GetManyByUserIdAsync(user.Id)
|
||||
sutProvider.GetDependency<ICollectionService>()
|
||||
.GetOrganizationCollections(orgId)
|
||||
.Returns(collections);
|
||||
|
||||
// Act
|
||||
@ -219,7 +219,7 @@ public class CollectionsControllerTests
|
||||
OrganizationId = orgId.ToString()
|
||||
};
|
||||
|
||||
var collections = new List<CollectionDetails>
|
||||
var collections = new List<Collection>
|
||||
{
|
||||
new CollectionDetails
|
||||
{
|
||||
@ -236,8 +236,8 @@ public class CollectionsControllerTests
|
||||
.UserId
|
||||
.Returns(user.Id);
|
||||
|
||||
sutProvider.GetDependency<ICollectionRepository>()
|
||||
.GetManyByUserIdAsync(user.Id)
|
||||
sutProvider.GetDependency<ICollectionService>()
|
||||
.GetOrganizationCollections(orgId)
|
||||
.Returns(collections);
|
||||
|
||||
// Act
|
||||
|
Reference in New Issue
Block a user