Skip to content

Commit

Permalink
Write integration test for invalid zip code
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhays committed May 24, 2022
1 parent 68087a6 commit 0788ea5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/server/routers/plan/__tests__/listPlansRouter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,14 @@ test('returns plans for valid zip codes', async () => {
expect(response.status).to.equal(200)
expect(data!.length).to.equal(54)
})

test('returns no plans for invalid zip codes', async () => {
const { response, data } = await trpcFetch({
path: 'plan.all',
method: 'GET',
input: { zipCode: '00000' },
})

expect(response.status).to.equal(200)
expect(data!.length).to.equal(0)
})

1 comment on commit 0788ea5

@vercel
Copy link

@vercel vercel bot commented on 0788ea5 May 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.