Permalink
Browse files

Use deepEqual when checking session data, adjust make_data() to inclu…

…de nested objects
  • Loading branch information...
lazd committed Jul 10, 2013
1 parent a73d21d commit 03e8e90a534c083ebfa1ca4949cd24383fd013a3
Showing with 6 additions and 1 deletion.
  1. +6 −1 test/connect-mongo.test.js
@@ -32,6 +32,11 @@ var make_cookie = function() {
var make_data = function() {
return {
foo: 'bar',
+ baz: {
+ cow: 'moo',
+ chicken: 'cluck'
+ },
+ num: 1,
cookie: make_cookie()
};
};
@@ -51,7 +56,7 @@ var assert_session_equals = function(sid, data, session) {
assert.deepEqual(session.session.cookie, data.cookie.toJSON());
}
else {
- assert.strictEqual(session.session[prop], data[prop]);
+ assert.deepEqual(session.session[prop], data[prop]);
}
}
}

0 comments on commit 03e8e90

Please sign in to comment.