Skip to content
This repository
Browse code

Automigrate before relation tests

  • Loading branch information...
commit 349931780a6b25622f5d72d494f98b2e26a186e8 1 parent e8077fa
Anatoliy Chakkaev authored

Showing 1 changed file with 10 additions and 8 deletions. Show diff stats Hide diff stats

  1. +10 8 test/relations.test.js
18 test/relations.test.js
@@ -117,14 +117,16 @@ describe('relations', function() {
117 117
118 118 it('can be used to query data', function(done) {
119 119 List.hasMany('todos', {model: Item});
120   - List.create(function(e, list) {
121   - should.not.exist(e);
122   - should.exist(list);
123   - list.todos.create(function(err, todo) {
124   - todo.list(function(e, l) {
125   - should.not.exist(e);
126   - should.exist(l);
127   - done();
  120 + db.automigrate(function() {
  121 + List.create(function(e, list) {
  122 + should.not.exist(e);
  123 + should.exist(list);
  124 + list.todos.create(function(err, todo) {
  125 + todo.list(function(e, l) {
  126 + should.not.exist(e);
  127 + should.exist(l);
  128 + done();
  129 + });
128 130 });
129 131 });
130 132 });

0 comments on commit 3499317

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