Blame view
tests/signup.js
904 Bytes
f0c912bf1
|
1 2 3 4 5 6 |
/* eslint-env mocha */ /* eslint-disable func-names, prefer-arrow-callback */ describe('Sign Up', function () { beforeEach(function () { server.execute(function () { |
cac7cbc73
|
7 |
const { Meteor } = require('meteor/meteor'); |
f0c912bf1
|
8 9 10 |
const user = Meteor.users.findOne({ 'emails.address': 'carl.winslow@abc.com' }); if (user) { Meteor.users.remove(user._id); |
f7c1860b5
|
11 12 13 |
} }); }); |
cac7cbc73
|
14 |
it('should create a new user and login with redirect to index @watch', function () { |
f0c912bf1
|
15 16 17 18 19 20 |
browser.url('http://localhost:3000/signup') .setValue('[name="firstName"]', 'Carl') .setValue('[name="lastName"]', 'Winslow') .setValue('[name="emailAddress"]', 'carl.winslow@abc.com') .setValue('[name="password"]', 'bigguy1989') .submitForm('form'); |
f7c1860b5
|
21 |
|
f0c912bf1
|
22 23 |
browser.waitForExist('.jumbotron'); expect(browser.getUrl()).to.equal('http://localhost:3000/'); |
f7c1860b5
|
24 25 |
}); }); |