Created
May 21, 2015 16:26
-
-
Save mraible/4c01f5ad60e7d7cb6ffb to your computer and use it in GitHub Desktop.
Setting expectations when making direct server calls with Protractor
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
it('should delete account successfully', function (done) { | |
req.post({json: true, url: constants.apiHostname() + '/api/v1/login/', form: {username: generatedEmail, password: password}}, function(error, message, body) { | |
var userId = body.user.id; | |
expect(userId).not.toBe(null); | |
req.del(constants.apiHostname() + '/api/v1/users/' + userId, done, function (error, message, body) { | |
expect(userId).toBe(204); | |
done(); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment