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_label_change_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 entities/bug/op_label_change_test.go (limited to 'entities/bug/op_label_change_test.go') diff --git a/entities/bug/op_label_change_test.go b/entities/bug/op_label_change_test.go new file mode 100644 index 00000000..edbe4714 --- /dev/null +++ b/entities/bug/op_label_change_test.go @@ -0,0 +1,20 @@ +package bug + +import ( + "testing" + + "github.com/MichaelMure/git-bug/entities/identity" + "github.com/MichaelMure/git-bug/entity/dag" +) + +func TestLabelChangeSerialize(t *testing.T) { + dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *LabelChangeOperation { + return NewLabelChangeOperation(author, unixTime, []Label{"added"}, []Label{"removed"}) + }) + dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *LabelChangeOperation { + return NewLabelChangeOperation(author, unixTime, []Label{"added"}, nil) + }) + dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *LabelChangeOperation { + return NewLabelChangeOperation(author, unixTime, nil, []Label{"removed"}) + }) +} -- cgit