From c8ecb086f9b90f58efb83b4676e76a6a135d9c47 Mon Sep 17 00:00:00 2001 From: Sahat Yalkabov Date: Wed, 5 Mar 2014 16:00:12 -0500 Subject: [PATCH] Updated test for creating a duplicate user --- test/models.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/models.js b/test/models.js index 0f4260d8a9..7fc38b03e0 100644 --- a/test/models.js +++ b/test/models.js @@ -20,8 +20,8 @@ describe('User Model', function() { password: 'password' }); user.save(function(err) { - if (err) return done(); - done('Created a user with duplicate email'); + if (err) err.code.should.equal(11000); + done(); }); });