(t *testing.T)
| 52 | } |
| 53 | |
| 54 | func TestClassroomAssignment_Marshal(t *testing.T) { |
| 55 | t.Parallel() |
| 56 | testJSONMarshal(t, &ClassroomAssignment{}, "{}") |
| 57 | |
| 58 | a := &ClassroomAssignment{ |
| 59 | ID: Ptr(int64(12)), |
| 60 | PublicRepo: Ptr(false), |
| 61 | Title: Ptr("Intro to Binaries"), |
| 62 | Type: Ptr("individual"), |
| 63 | InviteLink: Ptr("https://example.com/a/Lx7jiUgx"), |
| 64 | InvitationsEnabled: Ptr(true), |
| 65 | Slug: Ptr("intro-to-binaries"), |
| 66 | StudentsAreRepoAdmins: Ptr(false), |
| 67 | FeedbackPullRequestsEnabled: Ptr(true), |
| 68 | MaxTeams: Ptr(0), |
| 69 | MaxMembers: Ptr(0), |
| 70 | Editor: Ptr("codespaces"), |
| 71 | Accepted: Ptr(100), |
| 72 | Submitted: Ptr(40), |
| 73 | Passing: Ptr(10), |
| 74 | Language: Ptr("ruby"), |
| 75 | Deadline: &Timestamp{referenceTime}, |
| 76 | StarterCodeRepository: &Repository{ |
| 77 | ID: Ptr(int64(1296269)), |
| 78 | FullName: Ptr("octocat/Hello-World"), |
| 79 | }, |
| 80 | Classroom: &Classroom{ |
| 81 | ID: Ptr(int64(1296269)), |
| 82 | Name: Ptr("Programming Elixir"), |
| 83 | }, |
| 84 | } |
| 85 | |
| 86 | want := `{ |
| 87 | "id": 12, |
| 88 | "public_repo": false, |
| 89 | "title": "Intro to Binaries", |
| 90 | "type": "individual", |
| 91 | "invite_link": "https://example.com/a/Lx7jiUgx", |
| 92 | "invitations_enabled": true, |
| 93 | "slug": "intro-to-binaries", |
| 94 | "students_are_repo_admins": false, |
| 95 | "feedback_pull_requests_enabled": true, |
| 96 | "max_teams": 0, |
| 97 | "max_members": 0, |
| 98 | "editor": "codespaces", |
| 99 | "accepted": 100, |
| 100 | "submitted": 40, |
| 101 | "passing": 10, |
| 102 | "language": "ruby", |
| 103 | "deadline": ` + referenceTimeStr + `, |
| 104 | "starter_code_repository": { |
| 105 | "id": 1296269, |
| 106 | "full_name": "octocat/Hello-World" |
| 107 | }, |
| 108 | "classroom": { |
| 109 | "id": 1296269, |
| 110 | "name": "Programming Elixir" |
| 111 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…