(t *testing.T)
| 196 | } |
| 197 | |
| 198 | func TestRepositoriesService_GetCommitRaw_patch(t *testing.T) { |
| 199 | t.Parallel() |
| 200 | client, mux, _ := setup(t) |
| 201 | |
| 202 | const rawStr = "@@patch content" |
| 203 | |
| 204 | mux.HandleFunc("/repos/o/r/commits/s", func(w http.ResponseWriter, r *http.Request) { |
| 205 | testMethod(t, r, "GET") |
| 206 | testHeader(t, r, "Accept", mediaTypeV3Patch) |
| 207 | fmt.Fprint(w, rawStr) |
| 208 | }) |
| 209 | |
| 210 | ctx := t.Context() |
| 211 | got, _, err := client.Repositories.GetCommitRaw(ctx, "o", "r", "s", RawOptions{Type: Patch}) |
| 212 | if err != nil { |
| 213 | t.Fatalf("Repositories.GetCommitRaw returned error: %v", err) |
| 214 | } |
| 215 | want := rawStr |
| 216 | if got != want { |
| 217 | t.Errorf("Repositories.GetCommitRaw returned %v want %v", got, want) |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | func TestRepositoriesService_GetCommitRaw_invalid(t *testing.T) { |
| 222 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…