diff --git a/github/event_types_test.go b/github/event_types_test.go index 5246a0028cc..7c98c80be64 100644 --- a/github/event_types_test.go +++ b/github/event_types_test.go @@ -84,14 +84,8 @@ func TestEditChange_Marshal_BaseChange(t *testing.T) { func TestProjectChange_Marshal_NameChange(t *testing.T) { testJSONMarshal(t, &ProjectChange{}, "{}") - NameFrom := struct { - From *string `json:"from,omitempty"` - }{ - From: String("NameFrom"), - } - u := &ProjectChange{ - Name: &NameFrom, + Name: &ProjectName{From: String("NameFrom")}, Body: nil, } @@ -107,15 +101,9 @@ func TestProjectChange_Marshal_NameChange(t *testing.T) { func TestProjectChange_Marshal_BodyChange(t *testing.T) { testJSONMarshal(t, &ProjectChange{}, "{}") - BodyFrom := struct { - From *string `json:"from,omitempty"` - }{ - From: String("BodyFrom"), - } - u := &ProjectChange{ Name: nil, - Body: &BodyFrom, + Body: &ProjectBody{From: String("BodyFrom")}, } want := `{ @@ -130,14 +118,8 @@ func TestProjectChange_Marshal_BodyChange(t *testing.T) { func TestProjectCardChange_Marshal_NoteChange(t *testing.T) { testJSONMarshal(t, &ProjectCardChange{}, "{}") - NoteFrom := struct { - From *string `json:"from,omitempty"` - }{ - From: String("NoteFrom"), - } - u := &ProjectCardChange{ - Note: &NoteFrom, + Note: &ProjectCardNote{From: String("NoteFrom")}, } want := `{ @@ -152,14 +134,8 @@ func TestProjectCardChange_Marshal_NoteChange(t *testing.T) { func TestProjectColumnChange_Marshal_NameChange(t *testing.T) { testJSONMarshal(t, &ProjectColumnChange{}, "{}") - NameFrom := struct { - From *string `json:"from,omitempty"` - }{ - From: String("NameFrom"), - } - u := &ProjectColumnChange{ - Name: &NameFrom, + Name: &ProjectColumnName{From: String("NameFrom")}, } want := `{