Created
May 23, 2014 17:57
-
-
Save kgarfinkel/c5daea124b33adc7135b to your computer and use it in GitHub Desktop.
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
describe.only('when user is verified and all fields are valid', function () { | |
var apiUserSession = { | |
sessionId: 'full-sail', | |
user: apiUsers[users.user.api_id] | |
}; | |
given.apiUserCanBeSignedInWith(apiUserSession); | |
given.anExistingApiUserWith(apiUsers[users.user.api_id]); | |
before(function (done) { | |
var form, | |
self = this; | |
form = _.map(_.pick(users.user, 'email', 'password'), function (val, key) { | |
return key + '=' + encodeURIComponent(val); | |
}).join('&'); | |
this.session.request('post', '/signin') | |
.set('Content-type', 'application/x-www-form-urlencoded') | |
.set('Accept', 'text/html') | |
.send(form) | |
.expect(302) | |
.expect('Location', '/') | |
.end(function (err, res) { | |
console.log('/signin err ', err); | |
}); | |
}); | |
shouldUpdateSession({ | |
sessionId: 'full-sail', | |
email: users.user.email | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment