| 120 | |
| 121 | |
| 122 | TEST_F(ResourceProviderManagerHttpApiTest, NoContentType) |
| 123 | { |
| 124 | http::Request request; |
| 125 | request.method = "POST"; |
| 126 | request.headers = createBasicAuthHeaders(DEFAULT_CREDENTIAL); |
| 127 | |
| 128 | ResourceProviderManager manager( |
| 129 | Registrar::create(Owned<Storage>(new InMemoryStorage)).get()); |
| 130 | |
| 131 | Future<http::Response> response = manager.api(request, None()); |
| 132 | |
| 133 | AWAIT_EXPECT_RESPONSE_STATUS_EQ(BadRequest().status, response); |
| 134 | AWAIT_EXPECT_RESPONSE_BODY_EQ( |
| 135 | "Expecting 'Content-Type' to be present", |
| 136 | response); |
| 137 | } |
| 138 | |
| 139 | |
| 140 | // This test sends a valid JSON blob that cannot be deserialized |
nothing calls this directly
no test coverage detected