From 5511c230b678a181cc596238bf6669428d1b1902 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Thu, 18 Aug 2022 23:34:05 +0200 Subject: move {bug,identity} to /entities, move input to /commands --- entities/bug/op_add_comment_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 entities/bug/op_add_comment_test.go (limited to 'entities/bug/op_add_comment_test.go') diff --git a/entities/bug/op_add_comment_test.go b/entities/bug/op_add_comment_test.go new file mode 100644 index 00000000..6f29cb01 --- /dev/null +++ b/entities/bug/op_add_comment_test.go @@ -0,0 +1,18 @@ +package bug + +import ( + "testing" + + "github.com/MichaelMure/git-bug/entities/identity" + "github.com/MichaelMure/git-bug/entity/dag" + "github.com/MichaelMure/git-bug/repository" +) + +func TestAddCommentSerialize(t *testing.T) { + dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *AddCommentOperation { + return NewAddCommentOp(author, unixTime, "message", nil) + }) + dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *AddCommentOperation { + return NewAddCommentOp(author, unixTime, "message", []repository.Hash{"hash1", "hash2"}) + }) +} -- cgit