Skip to content

Commit

Permalink
feat: add tests for checking if proper Input is used
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Berezovsky committed Jul 15, 2020
1 parent efcfe27 commit 68ba371
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions tests/endpoints/OAuth.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,24 @@ describe("oauth", () => {
);

const response = await API_CLIENT.oauth.getToken({
client_id: "client_id",
client_secret: "client_secret",
redirect_uri: "redirect_uri",
authorization_code: "authorization_code"
clientId: "client_id",
clientSecret: "client_secret",
redirectUri: "redirect_uri",
authorizationCode: "authorization_code"
});

expect(response).toEqual("access_token");
});

test("api - without data", async () => {
expect(() =>
API_CLIENT.oauth.getToken({
clientSecret: "client_secret",
redirectUri: "redirect_uri",
authorizationCode: "authorization_code"
})
).toThrowError();
});
});

describe("setToken", () => {
Expand Down

0 comments on commit 68ba371

Please sign in to comment.