mirror of
https://github.com/bitwarden/server.git
synced 2024-11-29 13:25:17 +01:00
29 lines
942 B
C#
29 lines
942 B
C#
|
using System.Threading.Tasks;
|
|||
|
using Bit.Core.Entities;
|
|||
|
using Bit.Core.Models.Data.Organizations.OrganizationConnections;
|
|||
|
using Bit.Core.OrganizationFeatures.OrganizationConnections;
|
|||
|
using Bit.Core.Repositories;
|
|||
|
using Bit.Test.Common.AutoFixture;
|
|||
|
using Bit.Test.Common.AutoFixture.Attributes;
|
|||
|
using Bit.Test.Common.Helpers;
|
|||
|
using NSubstitute;
|
|||
|
using Xunit;
|
|||
|
|
|||
|
namespace Bit.Core.Test.OrganizationFeatures.OrganizationConnections
|
|||
|
{
|
|||
|
[SutProviderCustomize]
|
|||
|
public class DeleteOrganizationConnectionCommandTests
|
|||
|
{
|
|||
|
[Theory]
|
|||
|
[BitAutoData]
|
|||
|
public async Task DeleteAsync_CallsDelete(OrganizationConnection connection,
|
|||
|
SutProvider<DeleteOrganizationConnectionCommand> sutProvider)
|
|||
|
{
|
|||
|
await sutProvider.Sut.DeleteAsync(connection);
|
|||
|
|
|||
|
await sutProvider.GetDependency<IOrganizationConnectionRepository>().Received(1)
|
|||
|
.DeleteAsync(connection);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|