This repository has been archived by the owner on Apr 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(basket): Make calls directly to the basket server rather than th…
…e proxy Note: configuration under the basket namespace were merged into the marketing_email namespace, there doesn't seem to be a good reason for both namespaces to exist. fixes #7048 BREAKING CHANGE
- Loading branch information
Shane Tomlinson
committed
Mar 27, 2019
1 parent
aa89519
commit 263d343
Showing
4 changed files
with
18 additions
and
29 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
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 |
---|---|---|
|
@@ -76,14 +76,15 @@ describe('lib/marketing-email-client', () => { | |
it('returns a preferences URL for the user', () => { | ||
sinon.stub(xhrMock, 'ajax').callsFake(() => { | ||
return Promise.resolve({ | ||
token: 'users_uuid' | ||
// the fake basket server can return a token of the number 0, ensure this is handled. | ||
token: 0 | ||
}); | ||
}); | ||
|
||
return client.fetch('token', '[email protected]') | ||
.then(function (data) { | ||
assert.equal(data.token, 'users_uuid'); | ||
assert.equal(data.preferencesUrl, PREFERENCES_URL + 'users_uuid'); | ||
assert.strictEqual(data.token, 0); | ||
assert.strictEqual(data.preferencesUrl, `${PREFERENCES_URL}0`); | ||
|
||
assert.isTrue(xhrMock.ajax.calledOnce); | ||
const request = xhrMock.ajax.args[0][0]; | ||
|
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