From 2dcd06d1e722a81d00fd7f9ef0a62c72b20fac6b Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Mon, 10 Sep 2018 19:03:17 +0200 Subject: bug: ensure that OpBase field are public and properly serialized fix #37 --- bug/operations/add_comment.go | 2 +- bug/operations/create.go | 2 +- bug/operations/create_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'bug/operations') diff --git a/bug/operations/add_comment.go b/bug/operations/add_comment.go index 5ecc471a..b4126a8e 100644 --- a/bug/operations/add_comment.go +++ b/bug/operations/add_comment.go @@ -21,7 +21,7 @@ func (op AddCommentOperation) Apply(snapshot bug.Snapshot) bug.Snapshot { Message: op.Message, Author: op.Author, Files: op.files, - UnixTime: op.UnixTime(), + UnixTime: op.UnixTime, } snapshot.Comments = append(snapshot.Comments, comment) diff --git a/bug/operations/create.go b/bug/operations/create.go index 5fc939dd..ecbafb6f 100644 --- a/bug/operations/create.go +++ b/bug/operations/create.go @@ -22,7 +22,7 @@ func (op CreateOperation) Apply(snapshot bug.Snapshot) bug.Snapshot { { Message: op.Message, Author: op.Author, - UnixTime: op.UnixTime(), + UnixTime: op.UnixTime, }, } snapshot.Author = op.Author diff --git a/bug/operations/create_test.go b/bug/operations/create_test.go index 319cdb7f..a20472d3 100644 --- a/bug/operations/create_test.go +++ b/bug/operations/create_test.go @@ -21,7 +21,7 @@ func TestCreate(t *testing.T) { expected := bug.Snapshot{ Title: "title", Comments: []bug.Comment{ - {Author: rene, Message: "message", UnixTime: create.UnixTime()}, + {Author: rene, Message: "message", UnixTime: create.UnixTime}, }, Author: rene, CreatedAt: create.Time(), -- cgit