aboutsummaryrefslogtreecommitdiffstats
path: root/entities/bug/op_label_change_test.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-08-24 21:29:17 +0200
committerMichael Muré <batolettre@gmail.com>2022-08-24 21:31:48 +0200
commite1b172aaf0e984791b5af4a64b144339fd4042f6 (patch)
tree1306f7f617968e13e6f28eda51417ae8cd2c6c6a /entities/bug/op_label_change_test.go
parentccb71fea57bb17f267f135cb008470615595c5b7 (diff)
downloadgit-bug-e1b172aaf0e984791b5af4a64b144339fd4042f6.tar.gz
dag: test op serialisation with the unmarshaller, to allow resolving entities
Diffstat (limited to 'entities/bug/op_label_change_test.go')
-rw-r--r--entities/bug/op_label_change_test.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/entities/bug/op_label_change_test.go b/entities/bug/op_label_change_test.go
index edbe4714..e6dc8803 100644
--- a/entities/bug/op_label_change_test.go
+++ b/entities/bug/op_label_change_test.go
@@ -4,17 +4,18 @@ import (
"testing"
"github.com/MichaelMure/git-bug/entities/identity"
+ "github.com/MichaelMure/git-bug/entity"
"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, operationUnmarshaler, func(author identity.Interface, unixTime int64) (*LabelChangeOperation, entity.Resolvers) {
+ return NewLabelChangeOperation(author, unixTime, []Label{"added"}, []Label{"removed"}), nil
})
- dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *LabelChangeOperation {
- return NewLabelChangeOperation(author, unixTime, []Label{"added"}, nil)
+ dag.SerializeRoundTripTest(t, operationUnmarshaler, func(author identity.Interface, unixTime int64) (*LabelChangeOperation, entity.Resolvers) {
+ return NewLabelChangeOperation(author, unixTime, []Label{"added"}, nil), nil
})
- dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *LabelChangeOperation {
- return NewLabelChangeOperation(author, unixTime, nil, []Label{"removed"})
+ dag.SerializeRoundTripTest(t, operationUnmarshaler, func(author identity.Interface, unixTime int64) (*LabelChangeOperation, entity.Resolvers) {
+ return NewLabelChangeOperation(author, unixTime, nil, []Label{"removed"}), nil
})
}