(t *testing.T)
| 15 | ) |
| 16 | |
| 17 | func TestClassroom_Marshal(t *testing.T) { |
| 18 | t.Parallel() |
| 19 | testJSONMarshal(t, &Classroom{}, "{}") |
| 20 | |
| 21 | c := &Classroom{ |
| 22 | ID: Ptr(int64(1296269)), |
| 23 | Name: Ptr("Programming Elixir"), |
| 24 | Archived: Ptr(false), |
| 25 | Organization: &Organization{ |
| 26 | ID: Ptr(int64(1)), |
| 27 | Login: Ptr("programming-elixir"), |
| 28 | NodeID: Ptr("MDEyOk9yZ2FuaXphdGlvbjE="), |
| 29 | HTMLURL: Ptr("https://example.com/programming-elixir"), |
| 30 | Name: Ptr("Learn how to build fault tolerant applications"), |
| 31 | AvatarURL: Ptr("https://example.com/avatars/u/9919?v=4"), |
| 32 | }, |
| 33 | URL: Ptr("https://example.com/classrooms/programming"), |
| 34 | } |
| 35 | |
| 36 | want := `{ |
| 37 | "id": 1296269, |
| 38 | "name": "Programming Elixir", |
| 39 | "archived": false, |
| 40 | "organization": { |
| 41 | "id": 1, |
| 42 | "login": "programming-elixir", |
| 43 | "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", |
| 44 | "html_url": "https://example.com/programming-elixir", |
| 45 | "name": "Learn how to build fault tolerant applications", |
| 46 | "avatar_url": "https://example.com/avatars/u/9919?v=4" |
| 47 | }, |
| 48 | "url": "https://example.com/classrooms/programming" |
| 49 | }` |
| 50 | |
| 51 | testJSONMarshal(t, c, want) |
| 52 | } |
| 53 | |
| 54 | func TestClassroomAssignment_Marshal(t *testing.T) { |
| 55 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…