(t *testing.T)
| 174 | } |
| 175 | |
| 176 | func TestFindWorkflow_nonHTTPError(t *testing.T) { |
| 177 | t.Run("When the client fails to instantiate, it returns the error", func(t *testing.T) { |
| 178 | client := api.NewClientFromHTTP(&http.Client{Transport: &ErrorTransport{Err: errors.New("non-HTTP error")}}) |
| 179 | repo := ghrepo.New("OWNER", "REPO") |
| 180 | workflow, err := FindWorkflow(client, repo, "1", nil) |
| 181 | |
| 182 | require.Error(t, err) |
| 183 | assert.ErrorContains(t, err, "non-HTTP error") |
| 184 | assert.Nil(t, workflow) |
| 185 | }) |
| 186 | } |
| 187 | |
| 188 | func Test_getWorkflowsByName_filtering(t *testing.T) { |
| 189 | tests := []struct { |
nothing calls this directly
no test coverage detected