1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-28 13:15:12 +01:00
bitwarden-server/test/Core.Test/Vault/Models/CipherTests.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
709 B
C#
Raw Normal View History

using System.Text.Json;
using Bit.Core.Test.AutoFixture.CipherFixtures;
using Bit.Core.Vault.Entities;
using Bit.Test.Common.AutoFixture.Attributes;
using Xunit;
namespace Bit.Core.Test.Models;
2022-08-29 22:06:55 +02:00
public class CipherTests
{
2022-08-29 22:06:55 +02:00
[Theory]
[UserCipherCustomize]
[BitAutoData]
public void Clone_UserCipher_CreatesExactCopy(Cipher cipher)
{
Assert.Equal(JsonSerializer.Serialize(cipher), JsonSerializer.Serialize(cipher.Clone()));
}
[Theory]
[OrganizationCipherCustomize]
[BitAutoData]
public void Clone_OrganizationCipher_CreatesExactCopy(Cipher cipher)
{
Assert.Equal(JsonSerializer.Serialize(cipher), JsonSerializer.Serialize(cipher.Clone()));
}
}