diff options
author | Michael Muré <batolettre@gmail.com> | 2022-08-24 21:29:17 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2022-08-24 21:31:48 +0200 |
commit | e1b172aaf0e984791b5af4a64b144339fd4042f6 (patch) | |
tree | 1306f7f617968e13e6f28eda51417ae8cd2c6c6a /entities/bug/op_edit_comment_test.go | |
parent | ccb71fea57bb17f267f135cb008470615595c5b7 (diff) | |
download | git-bug-e1b172aaf0e984791b5af4a64b144339fd4042f6.tar.gz |
dag: test op serialisation with the unmarshaller, to allow resolving entities
Diffstat (limited to 'entities/bug/op_edit_comment_test.go')
-rw-r--r-- | entities/bug/op_edit_comment_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/entities/bug/op_edit_comment_test.go b/entities/bug/op_edit_comment_test.go index 1b649cd1..2ca1345e 100644 --- a/entities/bug/op_edit_comment_test.go +++ b/entities/bug/op_edit_comment_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/require" "github.com/MichaelMure/git-bug/entities/identity" + "github.com/MichaelMure/git-bug/entity" "github.com/MichaelMure/git-bug/entity/dag" "github.com/MichaelMure/git-bug/repository" ) @@ -75,10 +76,10 @@ func TestEdit(t *testing.T) { } func TestEditCommentSerialize(t *testing.T) { - dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *EditCommentOperation { - return NewEditCommentOp(author, unixTime, "target", "message", nil) + dag.SerializeRoundTripTest(t, operationUnmarshaler, func(author identity.Interface, unixTime int64) (*EditCommentOperation, entity.Resolvers) { + return NewEditCommentOp(author, unixTime, "target", "message", nil), nil }) - dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *EditCommentOperation { - return NewEditCommentOp(author, unixTime, "target", "message", []repository.Hash{"hash1", "hash2"}) + dag.SerializeRoundTripTest(t, operationUnmarshaler, func(author identity.Interface, unixTime int64) (*EditCommentOperation, entity.Resolvers) { + return NewEditCommentOp(author, unixTime, "target", "message", []repository.Hash{"hash1", "hash2"}), nil }) } |