func TestTime_FormatDate(t *testing.T) { at := model.Time{time.Date(2016, 2, 3, 4, 5, 6, 0, time.UTC)} actual := at.FormatDate() expected := "2016/02/03" if actual != expected { t.Errorf("wrong result: expected %s, but actual %s", expected, actual) } }