Created
March 22, 2017 14:42
-
-
Save aaronmcadam/b1a18f051c0e49982d76d9b1463ed1b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test('returns a genuine token when credentials are set', async () => { | |
const { | |
clientId, | |
clientSecret, | |
endpoint, | |
staffEmail: username, | |
staffPassword: password | |
} = secrets; | |
const oauthUrl = `${endpoint}/oauth/token`; | |
const result = await getAccessToken({ | |
clientId, | |
clientSecret, | |
oauthUrl, | |
username, | |
password | |
}); | |
expect(result.status).toBe(200); | |
expect(result.data.access_token).toBeTruthy(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment