Skip to content

Commit 9750956

Browse files
committed
fix mock server content type expectation for sparql form post
this ensures the mock server also accepts content-type with charset=UTF-8 appended
1 parent cc9263d commit 9750956

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/main/java/org/fairdatateam/fairdatapoint/api/controller/search/SearchSparqlController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
import java.net.URI;
5151
import java.util.HashMap;
5252
import java.util.List;
53-
import java.util.Map;
5453
import java.util.Optional;
5554
import java.util.function.Consumer;
5655

src/test/java/org/fairdatateam/fairdatapoint/acceptance/search/sparql/SearchSparqlControllerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public void proxyForwardingWorksForPostFormRequests() {
189189
this.mockBackendSparqlServer
190190
.expect(requestTo(TEST_SPARQL_ENDPOINT_URL))
191191
.andExpect(method(HttpMethod.POST))
192-
.andExpect(content().contentType(MediaType.APPLICATION_FORM_URLENCODED))
192+
.andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_FORM_URLENCODED))
193193
// form data from original request must arrive at server unaltered (except for empty lists)
194194
.andExpect(content().formData(formData))
195195
.andRespond(withSuccess().body(mockJsonBody));

0 commit comments

Comments
 (0)