Skip to content

Commit

Permalink
add User password test
Browse files Browse the repository at this point in the history
  • Loading branch information
westonplatter committed Feb 25, 2014
1 parent dda2d90 commit d30dde0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/models/User_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var User = require('../../models/User');

var mocha = require('mocha')
, chai = require('chai')
, should = chai.should()
, expect = chai.expect
, mongoose = require('mongoose');

Expand All @@ -16,11 +17,15 @@ describe('User attributes', function() {
});

it('_id is a mongoDB ObjectId', function() {
expect( user._id ).to.be.an.instanceOf(mongoose.Types.ObjectId);
user._id.should.be.an.instanceOf(mongoose.Types.ObjectId);
});

it('email should be a string', function() {
expect( user.email ).to.be.a( 'string' );
user.email.should.be.a( 'string' );
});

it('password should be a string', function() {
expect( user.password ).to.be.a( 'string' );
});
})

Expand Down

0 comments on commit d30dde0

Please sign in to comment.