diff --git a/test/Api.Test/Controllers/CollectionsControllerTests.cs b/test/Api.Test/Controllers/CollectionsControllerTests.cs index aefd7ad34c..bdcf6bc74e 100644 --- a/test/Api.Test/Controllers/CollectionsControllerTests.cs +++ b/test/Api.Test/Controllers/CollectionsControllerTests.cs @@ -5,7 +5,6 @@ using Bit.Api.Vault.AuthorizationHandlers.Collections; using Bit.Core.AdminConsole.Entities; using Bit.Core.Context; using Bit.Core.Entities; -using Bit.Core.Enums; using Bit.Core.Exceptions; using Bit.Core.Models.Data; using Bit.Core.OrganizationFeatures.OrganizationCollections.Interfaces; @@ -485,31 +484,4 @@ public class CollectionsControllerTests await sutProvider.GetDependency().DidNotReceiveWithAnyArgs() .AddAccessAsync(default, default, default); } - - [Theory, BitAutoData] - public async Task PutUsers_WithDefaultUserCollectionType_ThrowsBadRequest(Organization organization, - Collection collection, IEnumerable model, SutProvider sutProvider) - { - collection.Type = CollectionType.DefaultUserCollection; - collection.OrganizationId = organization.Id; - - sutProvider.GetDependency() - .GetByIdAsync(collection.Id) - .Returns(collection); - - sutProvider.GetDependency() - .AuthorizeAsync(Arg.Any(), - collection, - Arg.Is>(r => r.Contains(BulkCollectionOperations.ModifyUserAccess))) - .Returns(AuthorizationResult.Success()); - - var exception = await Assert.ThrowsAsync(() => - sutProvider.Sut.PutUsers(organization.Id, collection.Id, model)); - - Assert.Contains("You cannot modify member access for collections with the type as DefaultUserCollection.", exception.Message); - - await sutProvider.GetDependency() - .DidNotReceiveWithAnyArgs() - .UpdateUsersAsync(default, default); - } }