Reputation: 4374
I'm trying to run the following tests:
describe('set()', function () {
var returnedUser = session.set(user);
it('should return a User object', function () {
//this works fine
return returnedUser.should.eventually.equal(user);
});
it('returned User object should have sessionId appended', function() {
//DOES NOT WORK; always passes
return returnedUser.should.eventually.hasOwnProperty('thisdoesnotexist');
});
});
I'm trying to figure out the right syntax to test whether the returned User
object contains a 'sessionId'
property. Does anybody know how to do it?
Upvotes: 0
Views: 926