'use strict';

describe('Users', function() {
  it('should not be empty', function(done) {
    User.find().exec(function(err, rows) {
      rows.length.should.be.eql(fixtures.user.length);

      done();
    });
  });

  it('create user without password', function(done) {
    User.create({email:'test1@gmail.com', password: ''}).exec(function createCB(err, created){
      console.log('Created user with email '+ created.email);
      done();
    });
  });

  it('create user with password', function(done) {
    User.create({email:'test2@gmail.com', password: '123456'}).exec(function createCB(err, created){
      console.log('Created user with email '+ created.email);
      done();
    });
  });
});

@@ -180,18 +180,33 @@
 .length)
+.and.be.above(0)
 ;
-%0A
 %0A      d
@@ -370,77 +370,115 @@
 rr, 
-created)%7B%0A      console.log('Created user with email '+ created.email
+user) %7B%0A      user.should.be.an.instanceOf(Object).and.have.property('id').which.is.a.Number.and.be.above(0
 );%0A 
@@ -651,77 +651,163 @@
 rr, 
-created)%7B%0A      console.log('Created user with email '+ created.email
+user) %7B%0A      user.should.be.an.instanceOf(Object).and.have.property('id').which.is.a.Number.and.be.above(0);%0A      user.password.length.should.be.above(10
 );%0A 

update user model test.