diff --git a/ramls/request.json b/ramls/request.json index 42189648..7083f521 100644 --- a/ramls/request.json +++ b/ramls/request.json @@ -21,7 +21,7 @@ "ecsRequestPhase": { "description": "Stage in ECS request process, absence of this field means this is a single-tenant request", "type": "string", - "enum": ["Primary", "Secondary"] + "enum": ["Primary", "Secondary", "Intermediate"] }, "requestDate": { "description": "Date the request was made", diff --git a/src/test/java/org/folio/rest/api/RequestsApiTest.java b/src/test/java/org/folio/rest/api/RequestsApiTest.java index 164d7504..465b299b 100644 --- a/src/test/java/org/folio/rest/api/RequestsApiTest.java +++ b/src/test/java/org/folio/rest/api/RequestsApiTest.java @@ -1993,6 +1993,15 @@ public void canCreateRequestWithEcsRequestPhase() throws MalformedURLException, .create(), requestStorageUrl()).getJson(); assertThat(representation.getString("ecsRequestPhase"), is("Secondary")); + + representation = createEntity( + new RequestRequestBuilder() + .page() + .intermediate() + .withId(UUID.randomUUID()) + .create(), + requestStorageUrl()).getJson(); + assertThat(representation.getString("ecsRequestPhase"), is("Intermediate")); } @Test diff --git a/src/test/java/org/folio/rest/support/builders/RequestRequestBuilder.java b/src/test/java/org/folio/rest/support/builders/RequestRequestBuilder.java index 407965ff..dfc32ba9 100644 --- a/src/test/java/org/folio/rest/support/builders/RequestRequestBuilder.java +++ b/src/test/java/org/folio/rest/support/builders/RequestRequestBuilder.java @@ -405,4 +405,8 @@ public RequestRequestBuilder secondary() { return withEcsRequestPhase("Secondary"); } + public RequestRequestBuilder intermediate() { + return withEcsRequestPhase("Intermediate"); + } + }