MCPcopy Index your code
hub / github.com/git-bug/git-bug / TestSetMetadataSerialize

Function TestSetMetadataSerialize

entity/dag/op_set_metadata_test.go:107–118  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

105}
106
107func TestSetMetadataSerialize(t *testing.T) {
108 SerializeRoundTripTest(t, func(raw json.RawMessage, resolver entity.Resolvers) (Operation, error) {
109 var op SetMetadataOperation[*snapshotMock]
110 err := json.Unmarshal(raw, &op)
111 return &op, err
112 }, func(author identity.Interface, unixTime int64) (*SetMetadataOperation[*snapshotMock], entity.Resolvers) {
113 return NewSetMetadataOp[*snapshotMock](1, author, unixTime, "message", map[string]string{
114 "key1": "value1",
115 "key2": "value2",
116 }), nil
117 })
118}

Callers

nothing calls this directly

Calls 1

SerializeRoundTripTestFunction · 0.85

Tested by

no test coverage detected