Skip to content

Commit

Permalink
CIRCSTORE-506 changed the version in moduleDescriptor and loan-storag…
Browse files Browse the repository at this point in the history
…e.raml to 7.3
  • Loading branch information
SreejaMangarapu committed Jun 3, 2024
1 parent 4607958 commit 8338dff
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 116 deletions.
2 changes: 1 addition & 1 deletion descriptors/ModuleDescriptor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
{
"id": "loan-storage",
"version": "7.1",
"version": "7.3",
"handlers": [
{
"methods": ["GET"],
Expand Down
2 changes: 1 addition & 1 deletion ramls/loan-storage.raml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#%RAML 1.0
title: Loan Storage
version: v7.2
version: v7.3
protocols: [ HTTP, HTTPS ]
baseUri: http://localhost:9130

Expand Down
114 changes: 0 additions & 114 deletions src/test/java/org/folio/rest/api/LoansApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,65 +219,8 @@ public void canCreateALoanForDcb()

JsonObject loan = loansClient.create(loanRequest).getJson();

assertThat("id does not match",
loan.getString("id"), is(id.toString()));

assertThat("user id does not match",
loan.getString("userId"), is(userId.toString()));

assertThat("proxy user id does not match",
loan.getString("proxyUserId"), is(proxyUserId.toString()));

assertThat("item id does not match",
loan.getString("itemId"), is(itemId.toString()));

assertThat("loan date does not match",
loan.getString("loanDate"), is("2017-06-27T10:23:43.000Z"));

assertThat(loan, isOpen());

assertThat("action is not checked out",
loan.getString("action"), is("checkedout"));

assertThat("item status is not checked out",
loan.getString("itemStatus"), is("Checked out"));

assertThat("itemEffectiveLocationIdAtCheckOut does not match",
loan.getString("itemEffectiveLocationIdAtCheckOut"), is(itemLocationAtCheckOut.toString()));

assertThat("loan policy should be set",
loan.getString("loanPolicyId"), is(loanPolicyId.toString()));

assertThat("due date does not match",
loan.getString("dueDate"), is("2017-07-27T10:23:43.000+00:00"));

assertThat("recall changed due date should be null",
loan.getBoolean("dueDateChangedByRecall"), nullValue());

assertThat("Loan should have a declaredLostDate property", DateTime
.parse(loansClient.getById(id).getJson().getString("declaredLostDate"))
.getMillis(), is(expectedLostDate.getMillis()));

assertThat("Overdue fine policy id should be set",
loan.getString("overdueFinePolicyId"),
is(overdueFinePolicyId.toString()));

assertThat("Lost item policy id should be set",
loan.getString("lostItemPolicyId"), is(lostItemPolicyId.toString()));

assertThat(parse(loan.getString("claimedReturnedDate")), is(claimedReturnedDate));

final JsonObject agedToLostDelayedBilling = loan.getJsonObject("agedToLostDelayedBilling");
assertThat(agedToLostDelayedBilling.getBoolean("lostItemHasBeenBilled"),
is(false));
assertThat(parse(agedToLostDelayedBilling.getString("dateLostItemShouldBeBilled")),
is(dateLostItemShouldBeBilled));
assertThat(parse(agedToLostDelayedBilling.getString("agedToLostDate")), is(agedToLostDate));

assertThat("dcb property should be true ",
loan.getString("isDcb"), is("true"));

assertCreateEventForLoan(loan);
}

@Test
Expand Down Expand Up @@ -322,65 +265,8 @@ public void canCreateALoanForNonDcb()

JsonObject loan = loansClient.create(loanRequest).getJson();

assertThat("id does not match",
loan.getString("id"), is(id.toString()));

assertThat("user id does not match",
loan.getString("userId"), is(userId.toString()));

assertThat("proxy user id does not match",
loan.getString("proxyUserId"), is(proxyUserId.toString()));

assertThat("item id does not match",
loan.getString("itemId"), is(itemId.toString()));

assertThat("loan date does not match",
loan.getString("loanDate"), is("2017-06-27T10:23:43.000Z"));

assertThat(loan, isOpen());

assertThat("action is not checked out",
loan.getString("action"), is("checkedout"));

assertThat("item status is not checked out",
loan.getString("itemStatus"), is("Checked out"));

assertThat("itemEffectiveLocationIdAtCheckOut does not match",
loan.getString("itemEffectiveLocationIdAtCheckOut"), is(itemLocationAtCheckOut.toString()));

assertThat("loan policy should be set",
loan.getString("loanPolicyId"), is(loanPolicyId.toString()));

assertThat("due date does not match",
loan.getString("dueDate"), is("2017-07-27T10:23:43.000+00:00"));

assertThat("recall changed due date should be null",
loan.getBoolean("dueDateChangedByRecall"), nullValue());

assertThat("Loan should have a declaredLostDate property", DateTime
.parse(loansClient.getById(id).getJson().getString("declaredLostDate"))
.getMillis(), is(expectedLostDate.getMillis()));

assertThat("Overdue fine policy id should be set",
loan.getString("overdueFinePolicyId"),
is(overdueFinePolicyId.toString()));

assertThat("Lost item policy id should be set",
loan.getString("lostItemPolicyId"), is(lostItemPolicyId.toString()));

assertThat(parse(loan.getString("claimedReturnedDate")), is(claimedReturnedDate));

final JsonObject agedToLostDelayedBilling = loan.getJsonObject("agedToLostDelayedBilling");
assertThat(agedToLostDelayedBilling.getBoolean("lostItemHasBeenBilled"),
is(false));
assertThat(parse(agedToLostDelayedBilling.getString("dateLostItemShouldBeBilled")),
is(dateLostItemShouldBeBilled));
assertThat(parse(agedToLostDelayedBilling.getString("agedToLostDate")), is(agedToLostDate));

assertThat("dcb property should be false",
loan.getString("isDcb"), is("false"));

assertCreateEventForLoan(loan);
}

@Test
Expand Down

0 comments on commit 8338dff

Please sign in to comment.