diff --git a/tests/client.test.ts b/tests/client.test.ts index 62bd4dc..da09ad0 100644 --- a/tests/client.test.ts +++ b/tests/client.test.ts @@ -101,7 +101,7 @@ describe("Testing QuantClient", () => { }) expect(t.getClient('organization').headers).toMatchObject({ 'User-Agent': 'Quant (+http://api.quantcdn.io)', - 'Quant-Organization': config.organization, + 'Quant-Organisation': config.organization, 'Authorization': `Bearer ${config.bearer}`, }) }) diff --git a/tests/fixtures/no-permission.json b/tests/fixtures/no-permission.json new file mode 100644 index 0000000..e907369 --- /dev/null +++ b/tests/fixtures/no-permission.json @@ -0,0 +1,4 @@ +{ + "error": true, + "message": "User does not have valid API access. Check the token is scoped for this organisation" +} diff --git a/tests/response.test.ts b/tests/response.test.ts index bb41e64..e06ed2f 100644 --- a/tests/response.test.ts +++ b/tests/response.test.ts @@ -113,6 +113,6 @@ describe('response test', () => { i++; } } - expect(i).toBe(21) + expect(i).toBe(20) }) })