TestHttpGetStatusCode3 test cases
(t *testing.T)
| 167 | |
| 168 | // TestHttpGetStatusCode3 test cases |
| 169 | func TestHttpGetStatusCode3(t *testing.T) { |
| 170 | t.Run("TestHttpGetStatusCode3", func(t *testing.T) { |
| 171 | httpClient := NewHTTPClient() |
| 172 | response, error := httpClient.Get( |
| 173 | context.TODO(), |
| 174 | "https://httpbin.org/status/404", |
| 175 | map[string]string{"arg1": "value1"}, |
| 176 | map[string]string{"X-Api-Key": "poodle-123"}, |
| 177 | ) |
| 178 | |
| 179 | pkg.Expect(t, http.StatusNotFound, httpClient.GetStatusCode(response)) |
| 180 | pkg.Expect(t, nil, error) |
| 181 | |
| 182 | body, error := httpClient.ToString(response) |
| 183 | |
| 184 | pkg.Expect(t, "", body) |
| 185 | pkg.Expect(t, nil, error) |
| 186 | }) |
| 187 | } |
| 188 | |
| 189 | // TestHttpGetStatusCode4 test cases |
| 190 | func TestHttpGetStatusCode4(t *testing.T) { |
nothing calls this directly
no test coverage detected