summaryrefslogtreecommitdiff
path: root/web-ui/src
diff options
context:
space:
mode:
authorTayane Fernandes <tayane.rmf@gmail.com>2017-03-15 14:34:09 -0300
committerTayane Fernandes <tayane.rmf@gmail.com>2017-03-16 10:28:44 -0300
commit30f450e4fe20ac0b2d8751bb3f940566aefd394f (patch)
tree88ff5c9bcb61042f05842bc8003b39b6fa0884a7 /web-ui/src
parent54c6c6b7c932ea7fe600592a861f7b46391b494d (diff)
[#971] Remove sinon and use expect to spy functions
with @tuliocasagrande
Diffstat (limited to 'web-ui/src')
-rw-r--r--web-ui/src/backup_account/backup_email/backup_email.spec.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/web-ui/src/backup_account/backup_email/backup_email.spec.js b/web-ui/src/backup_account/backup_email/backup_email.spec.js
index d6e3e4e7..8732003b 100644
--- a/web-ui/src/backup_account/backup_email/backup_email.spec.js
+++ b/web-ui/src/backup_account/backup_email/backup_email.spec.js
@@ -1,6 +1,5 @@
import { shallow } from 'enzyme';
import expect from 'expect';
-import sinon from 'sinon';
import React from 'react';
import { BackupEmail } from 'src/backup_account/backup_email/backup_email';
@@ -26,12 +25,12 @@ describe('BackupEmail', () => {
});
it('form submit should call parameter custom submit', () => {
- const mockOnSubmit = sinon.spy();
+ const mockOnSubmit = expect.createSpy();
const event = { preventDefault() {} };
page = shallow(<BackupEmail t={mockTranslations} onSubmit={mockOnSubmit} />);
page.instance().submitHandler(event);
- sinon.assert.calledOnce(mockOnSubmit);
+ expect(mockOnSubmit).toHaveBeenCalled();
});
describe('Email validation', () => {