Skip to content

Commit 2e47bff

Browse files
authored
Fix tests for merge of #1902 (#1954)
1 parent 5067660 commit 2e47bff

File tree

1 file changed

+4
-28
lines changed

1 file changed

+4
-28
lines changed

github/event_types_test.go

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,8 @@ func TestEditChange_Marshal_BaseChange(t *testing.T) {
8484
func TestProjectChange_Marshal_NameChange(t *testing.T) {
8585
testJSONMarshal(t, &ProjectChange{}, "{}")
8686

87-
NameFrom := struct {
88-
From *string `json:"from,omitempty"`
89-
}{
90-
From: String("NameFrom"),
91-
}
92-
9387
u := &ProjectChange{
94-
Name: &NameFrom,
88+
Name: &ProjectName{From: String("NameFrom")},
9589
Body: nil,
9690
}
9791

@@ -107,15 +101,9 @@ func TestProjectChange_Marshal_NameChange(t *testing.T) {
107101
func TestProjectChange_Marshal_BodyChange(t *testing.T) {
108102
testJSONMarshal(t, &ProjectChange{}, "{}")
109103

110-
BodyFrom := struct {
111-
From *string `json:"from,omitempty"`
112-
}{
113-
From: String("BodyFrom"),
114-
}
115-
116104
u := &ProjectChange{
117105
Name: nil,
118-
Body: &BodyFrom,
106+
Body: &ProjectBody{From: String("BodyFrom")},
119107
}
120108

121109
want := `{
@@ -130,14 +118,8 @@ func TestProjectChange_Marshal_BodyChange(t *testing.T) {
130118
func TestProjectCardChange_Marshal_NoteChange(t *testing.T) {
131119
testJSONMarshal(t, &ProjectCardChange{}, "{}")
132120

133-
NoteFrom := struct {
134-
From *string `json:"from,omitempty"`
135-
}{
136-
From: String("NoteFrom"),
137-
}
138-
139121
u := &ProjectCardChange{
140-
Note: &NoteFrom,
122+
Note: &ProjectCardNote{From: String("NoteFrom")},
141123
}
142124

143125
want := `{
@@ -152,14 +134,8 @@ func TestProjectCardChange_Marshal_NoteChange(t *testing.T) {
152134
func TestProjectColumnChange_Marshal_NameChange(t *testing.T) {
153135
testJSONMarshal(t, &ProjectColumnChange{}, "{}")
154136

155-
NameFrom := struct {
156-
From *string `json:"from,omitempty"`
157-
}{
158-
From: String("NameFrom"),
159-
}
160-
161137
u := &ProjectColumnChange{
162-
Name: &NameFrom,
138+
Name: &ProjectColumnName{From: String("NameFrom")},
163139
}
164140

165141
want := `{

0 commit comments

Comments
 (0)