aboutsummaryrefslogtreecommitdiffstats
path: root/entities/bug/op_create_test.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-08-24 21:40:30 +0200
committerGitHub <noreply@github.com>2022-08-24 21:40:30 +0200
commit5c91174a84592b027c1b432a72ebf2974ec0e4c5 (patch)
tree1306f7f617968e13e6f28eda51417ae8cd2c6c6a /entities/bug/op_create_test.go
parentccb71fea57bb17f267f135cb008470615595c5b7 (diff)
parente1b172aaf0e984791b5af4a64b144339fd4042f6 (diff)
downloadgit-bug-5c91174a84592b027c1b432a72ebf2974ec0e4c5.tar.gz
Merge pull request #861 from MichaelMure/test-with-unmarshaler
dag: test op serialisation with the unmarshaller, to allow resolving entities
Diffstat (limited to 'entities/bug/op_create_test.go')
-rw-r--r--entities/bug/op_create_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/entities/bug/op_create_test.go b/entities/bug/op_create_test.go
index e534162b..d8bde46f 100644
--- a/entities/bug/op_create_test.go
+++ b/entities/bug/op_create_test.go
@@ -40,10 +40,10 @@ func TestCreate(t *testing.T) {
}
func TestCreateSerialize(t *testing.T) {
- dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *CreateOperation {
- return NewCreateOp(author, unixTime, "title", "message", nil)
+ dag.SerializeRoundTripTest(t, operationUnmarshaler, func(author identity.Interface, unixTime int64) (*CreateOperation, entity.Resolvers) {
+ return NewCreateOp(author, unixTime, "title", "message", nil), nil
})
- dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *CreateOperation {
- return NewCreateOp(author, unixTime, "title", "message", []repository.Hash{"hash1", "hash2"})
+ dag.SerializeRoundTripTest(t, operationUnmarshaler, func(author identity.Interface, unixTime int64) (*CreateOperation, entity.Resolvers) {
+ return NewCreateOp(author, unixTime, "title", "message", []repository.Hash{"hash1", "hash2"}), nil
})
}