mirror of
https://github.com/bitwarden/server.git
synced 2025-07-04 01:22:50 -05:00
[Bug] Fix cipher clone yielding incorrect RevisionDate (#1031)
* Fix cipher clone yielding incorrect RevisionDate * PR fixes Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
This commit is contained in:
18
test/Core.Test/Models/CipherTests.cs
Normal file
18
test/Core.Test/Models/CipherTests.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using Bit.Core.Models.Table;
|
||||
using Bit.Core.Test.AutoFixture.CipherFixtures;
|
||||
using Newtonsoft.Json;
|
||||
using Xunit;
|
||||
|
||||
namespace Core.Test.Models
|
||||
{
|
||||
public class CipherTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineUserCipherAutoData]
|
||||
[InlineOrganizationCipherAutoData]
|
||||
public void Clone_CreatesExactCopy(Cipher cipher)
|
||||
{
|
||||
Assert.Equal(JsonConvert.SerializeObject(cipher), JsonConvert.SerializeObject(cipher.Clone()));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user