-
Notifications
You must be signed in to change notification settings - Fork 555
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure overrides are properly sent to auth0.js
- Loading branch information
1 parent
5931ffc
commit 2251d03
Showing
6 changed files
with
66 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import expect from 'expect.js'; | ||
import { webAuthOverrides } from 'core/web_api/helper'; | ||
|
||
describe('webAuthOverrides', () => { | ||
it('should return overrides if any field is compatible with WebAuth', function() { | ||
expect(webAuthOverrides({ __tenant: 'tenant1', __token_issuer: 'issuer1' })).to.eql({ | ||
__tenant: 'tenant1', | ||
__token_issuer: 'issuer1' | ||
}); | ||
}); | ||
|
||
it('should omit overrides that are not compatible with WebAuth', function() { | ||
expect( | ||
webAuthOverrides({ __tenant: 'tenant1', __token_issuer: 'issuer1', backgroundColor: 'blue' }) | ||
).to.eql({ __tenant: 'tenant1', __token_issuer: 'issuer1' }); | ||
}); | ||
|
||
it('should return null if no fields are compatible with WebAuth', function() { | ||
expect(webAuthOverrides({ backgroundColor: 'blue' })).to.not.be.ok(); | ||
}); | ||
}); |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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