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

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

27 lines
703 B
C#
Raw Normal View History

using System.Text.Json;
using Bit.Core.Entities;
using Bit.Core.Test.AutoFixture.CipherFixtures;
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()));
}
}