Skip to content

Commit

Permalink
EDSC-4234: Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
eudoroolivares2016 committed Sep 6, 2024
1 parent f0890fd commit 2efabf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions serverless/src/submitSwodlrOrder/__tests__/handler.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,13 +449,13 @@ describe('submitSwodlrOrder', () => {
})

const context = {}
await expect(submitSwodlrOrder(mockSwodlrOrder, context)).rejects.toEqual(new Error('Error: Too many granules'))
await expect(submitSwodlrOrder(mockSwodlrOrder, context)).rejects.toEqual(new Error('Error: Too many granules cannot submit to Swodlr api'))

const { queries } = dbTracker.queries

expect(queries[0].method).toEqual('first')
expect(queries[1].method).toEqual('update')
expect(queries[1].bindings).toEqual(['create_failed', 'Error: Too many granules', 12])
expect(queries[1].bindings).toEqual(['create_failed', 'Error: Too many granules cannot submit to Swodlr api', 12])
})

test('saves an error message if the create fails in swodlr order', async () => {
Expand Down

0 comments on commit 2efabf2

Please sign in to comment.