'use strict';

var expect = require('chai').expect;
var passwords = require('..');

describe('mongoose-password-bcrypt-nodejs', function() {
});

@@ -45,16 +45,52 @@
 expect;%0A
+var mongoose = require('mongoose');%0A
 var pass
@@ -170,12 +170,768 @@
 ion() %7B%0A
+  var User, bob;%0A%0A  beforeEach(function(done) %7B%0A    var conn = mongoose.createConnection('mongodb://localhost:27017/test');%0A%0A    var UserSchema = new mongoose.Schema(%7B%0A      name: String,%0A      password: String // required for this module to work%0A    %7D);%0A    UserSchema.plugin(passwords);%0A%0A    User = conn.model('User', UserSchema);%0A%0A    bob = new User(%7B%0A      username: 'bob',%0A      password: 'mfw'%0A    %7D);%0A    bob.save(done);%0A  %7D);%0A%0A  it('should correctly validate the password sync', function() %7B%0A    expect(bob.validPasswordSync('mfw')).to.be.true;%0A  %7D);%0A%0A  it('should reject an invalid password sync', function() %7B%0A    expect(bob.validPasswordSync('mfwnot')).to.be.false;%0A  %7D);%0A%0A  afterEach(function(done) %7B%0A    User.find().remove().exec(done);%0A  %7D);%0A
 %7D);%0A

Add tests