Skip to content

Commit

Permalink
Extract url to string constant
Browse files Browse the repository at this point in the history
  • Loading branch information
Janelle Law committed Aug 3, 2021
1 parent 7a6d826 commit dde758a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/test/java/itest/ReportIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@
public class ReportIT extends StandardSelfTest {

static final String TEST_RECORDING_NAME = "someRecording";
static final String REPORT_REQ_URL = "/api/v1/reports/";
static final String REPORT_REQ_URL = "/api/v1/reports";
static final String RECORDING_REQ_URL =
String.format("/api/v1/targets/%s/recordings", SELF_REFERENCE_TARGET_ID);
static final String ARCHIVE_REQ_URL = "/api/v1/recordings";
static final String TEMP_REPORT = "src/test/resources/reportTest.html";
static File file;
static Document doc;
Expand Down Expand Up @@ -179,7 +180,7 @@ void testGetReportShouldSendFile() throws Exception {

CompletableFuture<JsonObject> deleteArchivedRecResp = new CompletableFuture<>();
webClient
.delete(String.format("/api/v1/recordings/%s", savedRecordingName.get()))
.delete(String.format("%s/%s", ARCHIVE_REQ_URL, savedRecordingName.get()))
.send(
ar -> {
if (assertRequestStatus(ar, deleteArchivedRecResp)) {
Expand Down

0 comments on commit dde758a

Please sign in to comment.