Skip to content

Commit

Permalink
fix: update test cases to include paymentContent
Browse files Browse the repository at this point in the history
  • Loading branch information
KenLSM committed Feb 2, 2024
1 parent 492df9e commit 3c0ebcd
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/app/models/__tests__/submission.server.model.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ describe('Submission Model', () => {
verifiedContent: undefined,
version: 0,
created: submission.created,
paymentContent: {},
},
},
})
Expand Down Expand Up @@ -318,6 +319,7 @@ describe('Submission Model', () => {
verifiedContent: undefined,
version: 0,
created: submission.created,
paymentContent: {},
},
},
})
Expand Down Expand Up @@ -354,6 +356,7 @@ describe('Submission Model', () => {
verifiedContent: undefined,
version: 0,
created: submission.created,
paymentContent: {},
},
},
})
Expand Down Expand Up @@ -451,7 +454,7 @@ describe('Submission Model', () => {
})

// Act
const actualWebhookView = submission.getWebhookView()
const actualWebhookView = await submission.getWebhookView()

// Assert
expect(actualWebhookView).toEqual({
Expand All @@ -463,6 +466,7 @@ describe('Submission Model', () => {
verifiedContent: undefined,
attachmentDownloadUrls: {},
version: 1,
paymentContent: {},
},
})
})
Expand All @@ -483,7 +487,7 @@ describe('Submission Model', () => {
})

// Act
const actualWebhookView = submission.getWebhookView()
const actualWebhookView = await submission.getWebhookView()

// Assert
expect(actualWebhookView).toEqual({
Expand All @@ -495,6 +499,7 @@ describe('Submission Model', () => {
encryptedContent: MOCK_ENCRYPTED_CONTENT,
verifiedContent: MOCK_VERIFIED_CONTENT,
version: 1,
paymentContent: {},
},
})
})
Expand Down Expand Up @@ -526,7 +531,7 @@ describe('Submission Model', () => {
).populate('form', 'webhook')

// Act
const actualWebhookView = populatedSubmission!.getWebhookView()
const actualWebhookView = await populatedSubmission!.getWebhookView()

// Assert
expect(actualWebhookView).toEqual({
Expand All @@ -538,6 +543,7 @@ describe('Submission Model', () => {
encryptedContent: MOCK_ENCRYPTED_CONTENT,
verifiedContent: MOCK_VERIFIED_CONTENT,
version: 1,
paymentContent: {},
},
})
})
Expand All @@ -559,7 +565,7 @@ describe('Submission Model', () => {
})

// Act
const actualWebhookView = submission.getWebhookView()
const actualWebhookView = await submission.getWebhookView()

// Assert
expect(actualWebhookView).toBeNull()
Expand Down

0 comments on commit 3c0ebcd

Please sign in to comment.