Skip to content

Commit

Permalink
bug fix + test
Browse files Browse the repository at this point in the history
  • Loading branch information
karussell committed Sep 4, 2023
1 parent b50f250 commit 9923e70
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public Response handle(@QueryParam("q") @DefaultValue("") String query,
WebTarget target;
if (reverse) {
target = buildReverseTarget();
target.queryParam("radius", radius);
target = target.queryParam("radius", radius);
} else {
target = buildForwardTarget(query);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,18 @@ public void osmTags() {
assertEquals("battlefield", entry.getHits().get(0).getOsmValue());
}

@Test
public void testReverseWithOSMTags() {
Response response = client.target(String.format("http://localhost:%d/photon?point=40.694632,-74.097403&reverse=true&osm_tag=aeroway:aerodrome&radius=30", RULE.getLocalPort()))
.request()
.get();

assertThat(response.getStatus()).isEqualTo(200);

GHResponse entry = response.readEntity(GHResponse.class);
assertEquals("Newark Liberty International Airport", entry.getHits().get(0).getName());
}

@Test
public void testCorrectLocale() {
Response response = client.target(
Expand Down

0 comments on commit 9923e70

Please sign in to comment.