feat: adiciona flag disableAuthContentType

This commit is contained in:
Leandro Costa 2023-06-16 21:56:28 -03:00
parent e100d9cb7b
commit 970ccff48e
3 changed files with 23 additions and 5 deletions

View file

@ -105,6 +105,24 @@ describe("Get Access Token", () => {
})
);
});
it("Shoud Get with Credentials without ContentType", async () => {
const cli = getOauthClient({
...baseClientParams,
disableAuthContentType: true,
});
await accessTokenValidator(cli);
expect(mockedAxios.request).toBeCalledWith(
expect.objectContaining({
url: authUrl,
method: "POST",
headers: {
Authorization: basicAuth,
},
data: `grant_type=${defaultGrantValue}`,
})
);
});
});
describe("Request", () => {