diff --git a/test/get.test.ts b/test/get.test.ts index 0b44420..a64f128 100644 --- a/test/get.test.ts +++ b/test/get.test.ts @@ -148,10 +148,16 @@ for (const connection of ['ws', 'http']) { t.assert(putResp.headers['content-location']); t.assert(putResp.headers['x-oada-rev']); - await t.throwsAsync(getAxios( + await t.throwsAsync( + getAxios( `/bookmarks/${testName}/sometest4`, { 'X-OADA-Ensure-Link': 'versioned' } - )); + ), + { + code: '400', + message: 'X-OADA-Ensure-Link not allowed for this method', + } + ); }); test(`${connection}: Should allow you to get resources based on a tree`, async (t) => { diff --git a/test/put.test.ts b/test/put.test.ts index 729512c..042847c 100644 --- a/test/put.test.ts +++ b/test/put.test.ts @@ -166,11 +166,17 @@ for (const connection of ['ws', 'http']) { test(`${connection}: Should error when 'X-OADA-Ensure-Link' contains an unsupported value`, async (t) => { const { testName } = t.context as Context; - await t.throwsAsync(putAxios( + await t.throwsAsync( + putAxios( { somedata: 456 }, `/bookmarks/${testName}/sometest4`, { 'X-OADA-Ensure-Link': 'unsupportedValue' } - )); + ), + { + code: '400', + message: 'Unsupported value for X-OADA-Ensure-Link', + } + ); }); test(`${connection}: Should create the proper resource breaks on the server when a tree parameter is supplied to a deep endpoint`, async (t) => {