Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/sanity-check/api/oauth-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const oauthClient = client.oauth({
describe('OAuth Authentication API Test', () => {
it('should login with credentials', done => {
client.login({ email: process.env.EMAIL, password: process.env.PASSWORD }, { include_orgs: true, include_orgs_roles: true, include_stack_roles: true, include_user_settings: true }).then((response) => {
authtoken = response.user.authtoken
expect(response.notice).to.be.equal('Login Successful.', 'Login success messsage does not match.')
done()
})
Expand All @@ -32,7 +33,7 @@ describe('OAuth Authentication API Test', () => {

it('should get Current user info test', done => {
client.getUser().then((user) => {
authtoken = user.authtoken
expect(user.uid).not.to.be(undefined)
done()
})
.catch(done)
Expand Down
2 changes: 1 addition & 1 deletion test/sanity-check/api/user-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ describe('Contentstack User Session api Test', () => {
client.login({ email: process.env.EMAIL, password: process.env.PASSWORD }, { include_orgs: true, include_orgs_roles: true, include_stack_roles: true, include_user_settings: true }).then((response) => {
loggedinUserID = response.user.uid
jsonWrite(response.user, 'loggedinuser.json')
authtoken = response.user.authtoken
expect(response.notice).to.be.equal('Login Successful.', 'Login success messsage does not match.')
done()
})
Expand All @@ -58,7 +59,6 @@ describe('Contentstack User Session api Test', () => {

it('should get Current user info test', done => {
client.getUser().then((user) => {
authtoken = user.authtoken
expect(user.uid).to.be.equal(loggedinUserID)
done()
})
Expand Down
Loading