Skip to content

Commit

Permalink
Update BuyerPlugin to set type as 'inventory' and enable related test…
Browse files Browse the repository at this point in the history
… assertions in search tests
  • Loading branch information
mogii committed Jan 17, 2025
1 parent 6fa3437 commit ced8aff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ class BuyerPlugin {
if (!Array.isArray(OptStayResults)) OptStayResults = [OptStayResults];
return {
bookable: Boolean(SCheckPass),
// type: ACheckPass.type,
type: 'inventory',
rates: OptStayResults.map(rate => {
let externalRateText = R.pathOr('', ['ExternalRateDetails', 'ExtOptionDescr'], rate);
const extRatePlanDescr = R.pathOr('', ['ExternalRateDetails', 'ExtRatePlanDescr'], rate);
Expand Down
2 changes: 1 addition & 1 deletion index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ describe('search tests', () => {
expect(retVal).toMatchSnapshot();
expect(retVal.bookable).toBeTruthy();
expect(retVal.rates.length).toBeGreaterThan(0);
// expect(retVal.type).toBe('inventory');
expect(retVal.type).toBe('inventory');
});
it.skip('searchAvailabilityForItinerary - bookable - on request', async () => {
axios.mockImplementation(getFixture);
Expand Down

0 comments on commit ced8aff

Please sign in to comment.