fix two bogus test assertions

This commit is contained in:
Florian Dold 2021-04-09 16:43:57 +02:00
parent 15cecf126a
commit f30f923e15
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -124,11 +124,13 @@ export async function runMerchantInstancesTest(t: GlobalTestState) {
const exc = await t.assertThrowsAsync(async () => { const exc = await t.assertThrowsAsync(async () => {
console.log("requesting instances with auth", merchantClient.auth); console.log("requesting instances with auth", merchantClient.auth);
const resp = await merchantClient.getInstances(); const resp = await merchantClient.getInstances();
console.log("axios result:", resp); console.log("instances result:", resp);
}); });
console.log(exc);
t.assertAxiosError(exc); t.assertAxiosError(exc);
t.assertAxiosError(exc.response?.status === 401); t.assertTrue(exc.response?.status === 401);
merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl(), { merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl(), {
method: "token", method: "token",
@ -173,7 +175,7 @@ export async function runMerchantInstancesTest(t: GlobalTestState) {
}); });
console.log(exc); console.log(exc);
t.assertAxiosError(exc); t.assertAxiosError(exc);
t.assertDeepEqual(exc.response?.status, 403); t.assertDeepEqual(exc.response?.status, 401);
} }
} }