From 64b4bf2c9e9df9d70ce85f2926a150231352d22a Mon Sep 17 00:00:00 2001 From: alexanderkurash Date: Fri, 15 Nov 2024 15:09:54 +0200 Subject: [PATCH 1/2] CIRCSTORE-521 Change sorting in tests --- ramls/request.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ramls/request.json b/ramls/request.json index 8c1f5423..b00b5c9f 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", From 76740b490baf83dad0aa0f8d43f2aa109d8da500 Mon Sep 17 00:00:00 2001 From: alexanderkurash Date: Mon, 9 Dec 2024 15:45:46 +0200 Subject: [PATCH 2/2] CIRCSTORE-542 Add tests --- src/test/java/org/folio/rest/api/RequestsApiTest.java | 9 +++++++++ .../rest/support/builders/RequestRequestBuilder.java | 4 ++++ 2 files changed, 13 insertions(+) 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"); + } + }