Skip to content

Commit 4bfc6af

Browse files
committed
fix(sanity): use client with post-login authtoken for OAuth tests
After login(), replace client with contentstackClient(authtoken) so getUser and downstream OAuth tests (token exchange, logout) run authenticated instead of skipping with error 105.
1 parent 4efcaa8 commit 4bfc6af

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/sanity-check/api/oauth-test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ describe('OAuth Authentication API Tests', () => {
5757

5858
expect(response.notice).to.equal('Login Successful.')
5959
expect(authtoken).to.not.equal(undefined)
60+
61+
// Use a client with the new authtoken so subsequent tests (getUser, OAuth flow) are authenticated
62+
client = contentstackClient(authtoken)
6063
} catch (error) {
6164
console.log('Login warning:', error.message)
6265
this.skip()

0 commit comments

Comments
 (0)