UNPKG

digital-payments-sdk

Version:

The APIs detailed within this SDK will enable Shell's Fleet Solutions Customers to digitalize Shell Card/s and use them to pay to refuel their vehicles at Shell Stations.

56 lines (39 loc) 1.53 kB
/** * Shell SmartPay APILib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { FuelingController } from '../src'; import { testClient } from './testClient'; import { expectHeadersToMatch, makeApiCall } from './testHelper'; describe('FuelingController', () => { let controller : FuelingController; beforeAll(() => { controller = new FuelingController(testClient); }); it('should Test MppToken', async () => { const grantType = 'client_credentials'; const clientId = 'b2bmpp-cli'; const clientSecret = 'f20935d8f14a44bd1f0923cc4c4fa63f7b25922330cd5080f735f1a2769ece77ce245cfe8ba4cbd2a58544ee5113c200b8e37a7be33311e4b6f3c785bf3f37d2'; const response = await makeApiCall( () => controller.mppToken(grantType, clientId, clientSecret) ); expect(response.statusCode).toBe(200); const expectedHeaders = { 'Content-Type': ['application/json', true] }; expectHeadersToMatch(response.headers, expectedHeaders); }); it('should Test MppCancelFueling', async () => { const mppTransactionId = '000000001C48'; const response = await makeApiCall( () => controller.mppCancelFueling(mppTransactionId) ); expect(response.statusCode).toBe(200); }); it('should Test MppCancelFueling1', async () => { const mppTransactionId = '000000001C48'; const response = await makeApiCall( () => controller.mppCancelFueling(mppTransactionId) ); expect(response.statusCode).toBe(204); }); });