Skip to content

Commit

Permalink
feat(sc-57429): Support Opportunities API : fix tests data
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilpavlicko committed Mar 21, 2024
1 parent e23be74 commit 640e6fc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions test/chartmogul/customer.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ describe('Customer', () => {
type: 'recurring',
forecast_category: 'pipeline',
win_likelihood: 3,
custom: [{ key: 'from_campaign', value: 'true' }]
custom: [{ key: 'from_campaign', value: true }]
};

nock(config.API_BASE)
Expand All @@ -273,7 +273,7 @@ describe('Customer', () => {
type: 'recurring',
forecast_category: 'pipeline',
win_likelihood: 3,
custom: { from_campaign: 'true' },
custom: { from_campaign: true },
created_at: '2024-03-13T07:33:28.356Z',
updated_at: '2024-03-13T07:33:28.356Z'
});
Expand All @@ -290,7 +290,7 @@ describe('Customer', () => {
expect(opportunity.type).to.be.equal('recurring');
expect(opportunity.forecast_category).to.be.equal('pipeline');
expect(opportunity.win_likelihood).to.be.equal(3);
expect(opportunity.custom).to.deep.equal({ from_campaign: 'true' });
expect(opportunity.custom).to.deep.equal({ from_campaign: true });
});

it('gets all opportunities from a customer', async () => {
Expand All @@ -311,7 +311,7 @@ describe('Customer', () => {
type: 'recurring',
forecast_category: 'pipeline',
win_likelihood: 3,
custom: { from_campaign: 'true' },
custom: { from_campaign: true },
created_at: '2024-03-13T07:33:28.356Z',
updated_at: '2024-03-13T07:33:28.356Z'
}],
Expand Down
16 changes: 8 additions & 8 deletions test/chartmogul/opportunity.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('Opportunity', () => {
type: 'recurring',
forecast_category: 'pipeline',
win_likelihood: 3,
custom: [{ key: 'from_campaign', value: 'true' }]
custom: [{ key: 'from_campaign', value: true }]
};

nock(config.API_BASE)
Expand All @@ -37,7 +37,7 @@ describe('Opportunity', () => {
type: 'recurring',
forecast_category: 'pipeline',
win_likelihood: 3,
custom: { from_campaign: 'true' },
custom: { from_campaign: true },
created_at: '2024-03-13T07:33:28.356Z',
updated_at: '2024-03-13T07:33:28.356Z'
});
Expand All @@ -53,7 +53,7 @@ describe('Opportunity', () => {
expect(opportunity.type).to.be.equal('recurring');
expect(opportunity.forecast_category).to.be.equal('pipeline');
expect(opportunity.win_likelihood).to.be.equal(3);
expect(opportunity.custom).to.deep.equal({ from_campaign: 'true' });
expect(opportunity.custom).to.deep.equal({ from_campaign: true });
});

it('lists all opportunities from a customer', async () => {
Expand All @@ -75,7 +75,7 @@ describe('Opportunity', () => {
type: 'recurring',
forecast_category: 'pipeline',
win_likelihood: 3,
custom: { from_campaign: 'true' },
custom: { from_campaign: true },
created_at: '2024-03-13T07:33:28.356Z',
updated_at: '2024-03-13T07:33:28.356Z'
}
Expand Down Expand Up @@ -103,7 +103,7 @@ describe('Opportunity', () => {
type: 'recurring',
forecast_category: 'pipeline',
win_likelihood: 3,
custom: { from_campaign: 'true' },
custom: { from_campaign: true },
created_at: '2024-03-13T07:33:28.356Z',
updated_at: '2024-03-13T07:33:28.356Z'
});
Expand All @@ -122,7 +122,7 @@ describe('Opportunity', () => {
expect(opportunity.type).to.be.equal('recurring');
expect(opportunity.forecast_category).to.be.equal('pipeline');
expect(opportunity.win_likelihood).to.be.equal(3);
expect(opportunity.custom).to.deep.equal({ from_campaign: 'true' });
expect(opportunity.custom).to.deep.equal({ from_campaign: true });
});

it('updates an opportunity', async () => {
Expand All @@ -145,7 +145,7 @@ describe('Opportunity', () => {
type: 'recurring',
forecast_category: 'pipeline',
win_likelihood: 3,
custom: { from_campaign: 'true' },
custom: { from_campaign: true },
created_at: '2024-03-13T07:33:28.356Z',
updated_at: '2024-03-13T07:33:28.356Z'
});
Expand All @@ -164,7 +164,7 @@ describe('Opportunity', () => {
expect(opportunity.type).to.be.equal('recurring');
expect(opportunity.forecast_category).to.be.equal('pipeline');
expect(opportunity.win_likelihood).to.be.equal(3);
expect(opportunity.custom).to.deep.equal({ from_campaign: 'true' });
expect(opportunity.custom).to.deep.equal({ from_campaign: true });
});

it('deletes an opportunity', async () => {
Expand Down

0 comments on commit 640e6fc

Please sign in to comment.