Aligned BillingApi to new rest routes
MODIFY
test/api/BillingTest.ts
test/api/BillingTest.ts
@@ -309,7 +309,7 @@ describe('Billing', function() {
});
it('Should connect to Billing Provider', async () => {
- const response = await billingTestHelper.userService.billingApi.testConnection({}, TestConstants.DEFAULT_PAGING, TestConstants.DEFAULT_ORDERING);
+ const response = await billingTestHelper.userService.billingApi.testConnection();
expect(response.data.connectionIsValid).to.be.true;
expect(response.data).containSubset(Constants.REST_RESPONSE_SUCCESS);
});
@@ -429,7 +429,7 @@ describe('Billing', function() {
});
it('Should not be able to test connection to Billing Provider', async () => {
- const response = await billingTestHelper.userService.billingApi.testConnection({}, TestConstants.DEFAULT_PAGING, TestConstants.DEFAULT_ORDERING);
+ const response = await billingTestHelper.userService.billingApi.testConnection();
expect(response.status).to.be.eq(StatusCodes.FORBIDDEN);
});

MODIFY
test/api/client/BillingApi.ts
test/api/client/BillingApi.ts
@@ -8,8 +8,8 @@ export default class BillingApi extends CrudApi {
super(authenticatedApi);
}
- public async testConnection(params?, paging = TestConstants.DEFAULT_PAGING, ordering = TestConstants.DEFAULT_ORDERING) {
- return await super.readAll(params, paging, ordering, '/client/api/CheckBillingConnection');
+ public async testConnection() {
+ return await super.create(null, this.buildRestEndpointUrl(ServerRoute.REST_BILLING_CHECK));
}
public async synchronizeUsers(params?, paging = TestConstants.DEFAULT_PAGING, ordering = TestConstants.DEFAULT_ORDERING) {

Aligned BillingApi to new rest routes