Upgrade sinon (#10773)

* upgrade sinon

* sinon changes

* fix unit tests
This commit is contained in:
Matteo Pagliazzi
2018-10-26 18:15:28 +02:00
committed by GitHub
parent 61da558a5d
commit 56d1b77215
41 changed files with 150 additions and 137 deletions

View File

@@ -42,7 +42,7 @@ describe('checkout', () => {
beforeEach(() => {
approvalHerf = 'approval_href';
paypalPaymentCreateStub = sinon.stub(paypalPayments, 'paypalPaymentCreate')
.returnsPromise().resolves({
.resolves({
links: [{ rel: 'approval_url', href: approvalHerf }],
});
});
@@ -80,7 +80,7 @@ describe('checkout', () => {
it('should error if the user cannot get gems', async () => {
let user = new User();
sinon.stub(user, 'canGetGems').returnsPromise().resolves(false);
sinon.stub(user, 'canGetGems').resolves(false);
await expect(paypalPayments.checkout({user})).to.eventually.be.rejected.and.to.eql({
httpCode: 401,