1package bug
2
3import (
4 "testing"
5
6 "github.com/MichaelMure/git-bug/entities/identity"
7 "github.com/MichaelMure/git-bug/entity/dag"
8)
9
10func TestLabelChangeSerialize(t *testing.T) {
11 dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *LabelChangeOperation {
12 return NewLabelChangeOperation(author, unixTime, []Label{"added"}, []Label{"removed"})
13 })
14 dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *LabelChangeOperation {
15 return NewLabelChangeOperation(author, unixTime, []Label{"added"}, nil)
16 })
17 dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *LabelChangeOperation {
18 return NewLabelChangeOperation(author, unixTime, nil, []Label{"removed"})
19 })
20}