Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
azizbekxm committed Nov 7, 2024
1 parent b9902ba commit 3362a4b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion descriptors/ModuleDescriptor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,7 @@
"permissionName": "circulation.override-item-not-loanable-block.post",
"displayName": "circulation - override item not loanable block",
"description": "item not loanable block override",
"replaces": ["circulation.override-item-not-loanable-block"]
"replaces": ["circulation.override-item-not-loanable-block.post"]
},
{
"permissionName": "circulation.override-patron-block.post",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ public enum OverridableBlockType {
PATRON_BLOCK("patronBlock",
OkapiPermissions.of("circulation.override-patron-block.post")),
ITEM_LIMIT_BLOCK("itemLimitBlock",
OkapiPermissions.of("circulation.override-item-limit-block")),
OkapiPermissions.of("circulation.override-item-limit-block.post")),
ITEM_NOT_LOANABLE_BLOCK("itemNotLoanableBlock",
OkapiPermissions.of("circulation.override-item-not-loanable-block")),
OkapiPermissions.of("circulation.override-item-not-loanable-block.post")),
RENEWAL_BLOCK("renewalBlock",
OkapiPermissions.of("circulation.override-renewal-block.post")),
RENEWAL_DUE_DATE_REQUIRED_BLOCK("renewalDueDateRequiredBlock",
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/api/loans/CheckOutByBarcodeTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ class CheckOutByBarcodeTests extends APITests {
private static final ZonedDateTime TEST_DUE_DATE =
ZonedDateTime.of(2019, 4, 20, 11, 30, 0, 0, UTC);
public static final String OVERRIDE_ITEM_NOT_LOANABLE_BLOCK_PERMISSION =
"circulation.override-item-not-loanable-block";
"circulation.override-item-not-loanable-block.post";
public static final String OVERRIDE_PATRON_BLOCK_PERMISSION =
"circulation.override-patron-block";
"circulation.override-patron-block.post";
public static final String OVERRIDE_ITEM_LIMIT_BLOCK_PERMISSION =
"circulation.override-item-limit-block";
"circulation.override-item-limit-block.post";
public static final String INSUFFICIENT_OVERRIDE_PERMISSIONS =
"Insufficient override permissions";
private static final String TEST_COMMENT = "Some comment";
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/api/loans/RenewalAPITests.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@
public abstract class RenewalAPITests extends APITests {
public static final String PATRON_BLOCK_NAME = "patronBlock";
private static final String TEST_COMMENT = "Some comment";
private static final String OVERRIDE_PATRON_BLOCK_PERMISSION = "circulation.override-patron-block";
private static final String OVERRIDE_PATRON_BLOCK_PERMISSION = "circulation.override-patron-block.post";
public static final String OVERRIDE_ITEM_LIMIT_BLOCK_PERMISSION =
"circulation.override-item-limit-block";
"circulation.override-item-limit-block.post";
private static final String OVERRIDE_RENEWAL_BLOCK_PERMISSION = "circulation.override-renewal-block.post";
private static final String RENEWED_THROUGH_OVERRIDE = "renewedThroughOverride";
private static final String PATRON_WAS_BLOCKED_MESSAGE = "Patron blocked from renewing";
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/api/requests/RequestsAPICreationTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public class RequestsAPICreationTests extends APITests {
private static final UUID CANCELLATION_TEMPLATE_ID_FROM_TLR_SETTINGS = UUID.randomUUID();

public static final String CREATE_REQUEST_PERMISSION = "circulation.requests.item.post";
public static final String OVERRIDE_PATRON_BLOCK_PERMISSION = "circulation.override-patron-block";
public static final String OVERRIDE_PATRON_BLOCK_PERMISSION = "circulation.override-patron-block.post";
public static final OkapiHeaders HEADERS_WITH_ALL_OVERRIDE_PERMISSIONS =
buildOkapiHeadersWithPermissions(CREATE_REQUEST_PERMISSION, OVERRIDE_PATRON_BLOCK_PERMISSION);
public static final OkapiHeaders HEADERS_WITHOUT_OVERRIDE_PERMISSIONS =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public static Matcher<JsonObject> isInsufficientPermissionsError(

public static Matcher<JsonObject> isInsufficientPermissionsToOverridePatronBlockError() {
return isInsufficientPermissionsError("patronBlock",
List.of("circulation.override-patron-block"));
List.of("circulation.override-patron-block.post"));
}

}

0 comments on commit 3362a4b

Please sign in to comment.