From 0186f864a593a8a597dc5747db7177c0aa95e20a Mon Sep 17 00:00:00 2001 From: dtfiedler Date: Wed, 20 Sep 2023 13:16:07 -0600 Subject: [PATCH] chore(test): add a test that confirms a 404 is returned when a contract does not exist --- tests/integration/routes.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/integration/routes.test.ts b/tests/integration/routes.test.ts index 8ea6bfc..54f0e96 100644 --- a/tests/integration/routes.test.ts +++ b/tests/integration/routes.test.ts @@ -116,6 +116,13 @@ describe('PDNS Service Integration tests', () => { const { status } = await axios.get(`/v1/contract/non-matching-regex`); expect(status).to.equal(404); }); + + it('should throw a 404 for a contract that does not exist/has not been mined', async () => { + const { status } = await axios.get( + '/v1/contract/kbtXub0JcZYfBn7-WUgkFQjKmZb4y5DY2nT8WovBhWY', + ); + expect(status).to.equal(404); + }); }); describe('/:contractTxId/interactions', () => {