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


           
                 
 
                                                          
                                                   
                                                   


                                            





                                                                                                            
 
package bug

import (
	"testing"

	"github.com/MichaelMure/git-bug/entities/identity"
	"github.com/MichaelMure/git-bug/entity/dag"
	"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"})
	})
}