diff options
author | Michael Muré <batolettre@gmail.com> | 2022-11-29 13:01:53 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2022-11-29 13:01:53 +0100 |
commit | 4a341b5e1714a6a36ec7f5839a6a1b73571d4851 (patch) | |
tree | 261e108d1c9bd78e15e19379f611cfecb900fef5 /entity/dag/entity_test.go | |
parent | 0ac39a7ab5db077fcf0df827e32bf6e625e980da (diff) | |
download | git-bug-4a341b5e1714a6a36ec7f5839a6a1b73571d4851.tar.gz |
WIP
Diffstat (limited to 'entity/dag/entity_test.go')
-rw-r--r-- | entity/dag/entity_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/entity/dag/entity_test.go b/entity/dag/entity_test.go index e399b6c7..c457eb21 100644 --- a/entity/dag/entity_test.go +++ b/entity/dag/entity_test.go @@ -9,7 +9,7 @@ import ( func TestWriteRead(t *testing.T) { repo, id1, id2, resolver, def := makeTestContext() - entity := New(def) + entity := wrapper(New(def)) require.False(t, entity.NeedCommit()) entity.Append(newOp1(id1, "foo")) @@ -24,16 +24,16 @@ func TestWriteRead(t *testing.T) { require.NoError(t, entity.CommitAsNeeded(repo)) require.False(t, entity.NeedCommit()) - read, err := Read(def, repo, resolver, entity.Id()) + read, err := Read(def, wrapper, repo, resolver, entity.Id()) require.NoError(t, err) - assertEqualEntities(t, entity, read) + assertEqualEntities(t, entity.Entity, read.Entity) } func TestWriteReadMultipleAuthor(t *testing.T) { repo, id1, id2, resolver, def := makeTestContext() - entity := New(def) + entity := wrapper(New(def)) entity.Append(newOp1(id1, "foo")) entity.Append(newOp2(id2, "bar")) @@ -43,10 +43,10 @@ func TestWriteReadMultipleAuthor(t *testing.T) { entity.Append(newOp2(id1, "foobar")) require.NoError(t, entity.CommitAsNeeded(repo)) - read, err := Read(def, repo, resolver, entity.Id()) + read, err := Read(def, wrapper, repo, resolver, entity.Id()) require.NoError(t, err) - assertEqualEntities(t, entity, read) + assertEqualEntities(t, entity.Entity, read.Entity) } func assertEqualEntities(t *testing.T, a, b *Entity) { |