aboutsummaryrefslogblamecommitdiffstats
path: root/bug/op_add_comment_test.go
blob: efdf7601bf21bec2c1bd805ab3023af5d51a9c6c (plain) (tree)
1
2
3
4
5
6
7
8


           
                 
 
                                                   
                                                 
                                                   


                                            





                                                                                                            
 
package bug

import (
	"testing"

	"github.com/MichaelMure/git-bug/entity/dag"
	"github.com/MichaelMure/git-bug/identity"
	"github.com/MichaelMure/git-bug/repository"
)

func TestAddCommentSerialize(t *testing.T) {
	dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *AddCommentOperation {
		return NewAddCommentOp(author, unixTime, "message", nil)
	})
	dag.SerializeRoundTripTest(t, func(author identity.Interface, unixTime int64) *AddCommentOperation {
		return NewAddCommentOp(author, unixTime, "message", []repository.Hash{"hash1", "hash2"})
	})
}