Skip to content

Commit

Permalink
CIRCSTORE-542 Add Intermediate ECS request phase (#500)
Browse files Browse the repository at this point in the history
* CIRCSTORE-521 Change sorting in tests

* CIRCSTORE-542 Add tests
  • Loading branch information
alexanderkurash authored Dec 9, 2024
1 parent 01893fd commit 2e439a7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ramls/request.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 9 additions & 0 deletions src/test/java/org/folio/rest/api/RequestsApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,4 +405,8 @@ public RequestRequestBuilder secondary() {
return withEcsRequestPhase("Secondary");
}

public RequestRequestBuilder intermediate() {
return withEcsRequestPhase("Intermediate");
}

}

0 comments on commit 2e439a7

Please sign in to comment.