Skip to content
Browse files

Automigrate before relation tests

  • Loading branch information...
1 parent e8077fa commit 349931780a6b25622f5d72d494f98b2e26a186e8 @1602 committed Mar 31, 2013
Showing with 10 additions and 8 deletions.
  1. +10 −8 test/relations.test.js
View
18 test/relations.test.js
@@ -117,14 +117,16 @@ describe('relations', function() {
it('can be used to query data', function(done) {
List.hasMany('todos', {model: Item});
- List.create(function(e, list) {
- should.not.exist(e);
- should.exist(list);
- list.todos.create(function(err, todo) {
- todo.list(function(e, l) {
- should.not.exist(e);
- should.exist(l);
- done();
+ db.automigrate(function() {
+ List.create(function(e, list) {
+ should.not.exist(e);
+ should.exist(list);
+ list.todos.create(function(err, todo) {
+ todo.list(function(e, l) {
+ should.not.exist(e);
+ should.exist(l);
+ done();
+ });
});
});
});

0 comments on commit 3499317

Please sign in to comment.
Something went wrong with that request. Please try again.