Skip to content

Commit

Permalink
add TestNewSign (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
JunNishimura committed May 31, 2023
1 parent 01faf6d commit 70fbb04
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions internal/object/commit_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package object

import (
"reflect"
"testing"
"time"
)

func TestNewSign(t *testing.T) {
type args struct {
name string
email string
}
tests := []struct {
name string
args args
want *Sign
}{
{
name: "success",
args: args{
name: "test taro",
email: "test@example.com",
},
want: &Sign{
Name: "test taro",
Email: "test@example.com",
Timestamp: time.Now(),
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := NewSign(tt.args.name, tt.args.email)
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("got = %s, want = %s", got, tt.want)
}
})
}
}

0 comments on commit 70fbb04

Please sign in to comment.