blob: 4c60a577d9bb373536150581725e7792aba13549 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package dag
import (
"encoding/json"
"testing"
"github.com/git-bug/git-bug/entities/identity"
"github.com/git-bug/git-bug/entity"
)
func TestNoopSerialize(t *testing.T) {
SerializeRoundTripTest(t, func(raw json.RawMessage, resolver entity.Resolvers) (Operation, error) {
var op NoOpOperation[*snapshotMock]
err := json.Unmarshal(raw, &op)
return &op, err
}, func(author identity.Interface, unixTime int64) (*NoOpOperation[*snapshotMock], entity.Resolvers) {
return NewNoOpOp[*snapshotMock](1, author, unixTime), nil
})
}
|