From 5556f21b6129e82de19aaf7b78b8e99f88c66161 Mon Sep 17 00:00:00 2001 From: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> Date: Thu, 8 Jul 2021 15:55:03 -0400 Subject: [PATCH] Fix tests for merge of #1902 --- github/event_types_test.go | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) 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 := `{