Skip to content

Commit

Permalink
Update ApiTestBase.java
Browse files Browse the repository at this point in the history
  • Loading branch information
yuntianhu authored Jan 3, 2024
1 parent 52d87d2 commit ea330df
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/test/java/org/folio/rest/impl/ApiTestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,31 @@ public class ApiTestBase {
public static final String permissionsJsonArrayString = new JsonArray(permissionsList).encode();
public static final Header X_OKAPI_PERMISSION = new Header(UserPermissionsUtil.OKAPI_HEADER_PERMISSIONS, permissionsJsonArrayString);

public static final List<String> permissionsWithoutApproveAndPayList = Arrays.asList(
"invoice.invoices.item.put",
"invoices.acquisitions-units-assignments.manage",
"invoices.acquisitions-units-assignments.assign",
"invoices.fiscal-year.update"
);

public static final JsonArray permissionsWithoutApproveAndPayArray = new JsonArray(permissionsWithoutApproveAndPayList);
public static final String permissionsWithoutApproveAndPayJsonArrayString = new JsonArray(permissionsWithoutApproveAndPayList).encode();
//okapiHeaders.put(UserPermissionsUtil.OKAPI_HEADER_PERMISSIONS, permissionsJsonArrayString);
public static final Header X_OKAPI_PERMISSION_WITHOUT_PAY_APPROVE = new Header(UserPermissionsUtil.OKAPI_HEADER_PERMISSIONS, permissionsWithoutApproveAndPayJsonArrayString);

public static final List<String> permissionsWithoutPaidList = Arrays.asList(
"invoice.item.approve",
"invoice.invoices.item.put",
"invoices.acquisitions-units-assignments.manage",
"invoices.acquisitions-units-assignments.assign",
"invoices.fiscal-year.update"
);

public static final JsonArray permissionsWithoutPaidArray = new JsonArray(permissionsWithoutPaidList);
public static final String permissionsWithoutPaidJsonArrayString = new JsonArray(permissionsWithoutPaidList).encode();
//okapiHeaders.put(UserPermissionsUtil.OKAPI_HEADER_PERMISSIONS, permissionsJsonArrayString);
public static final Header X_OKAPI_PERMISSION_WITHOUT_PAY= new Header(UserPermissionsUtil.OKAPI_HEADER_PERMISSIONS, permissionsWithoutPaidJsonArrayString);

@BeforeAll
public static void before() throws InterruptedException, ExecutionException, TimeoutException {

Expand Down

0 comments on commit ea330df

Please sign in to comment.