blob: 35b77a8fcebd96e4b85b707a5661dbc8ad31a5df (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
package tests
import (
"github.com/MichaelMure/git-bug/bug"
"testing"
)
func TestOperationPackSerialize(t *testing.T) {
opp := bug.OperationPack{}
opp.Append(createOp)
opp.Append(setTitleOp)
opp.Append(addCommentOp)
data, err := opp.Serialize()
if err != nil {
t.Fatal(err)
}
if len(data) == 0 {
t.Fatal("empty serialized data")
}
_, err = bug.ParseOperationPack(data)
if err != nil {
t.Fatal(err)
}
}
|