Add automigrate to setup tables for replace test cases
This commit is contained in:
parent
e4918ba490
commit
8b8d474b92
|
@ -694,12 +694,13 @@ describe('manipulation', function () {
|
||||||
describe('replaceOrCreate', function() {
|
describe('replaceOrCreate', function() {
|
||||||
var Post;
|
var Post;
|
||||||
var ds = getSchema();
|
var ds = getSchema();
|
||||||
before(function() {
|
before(function(done) {
|
||||||
Post = ds.define('Post', {
|
Post = ds.define('Post', {
|
||||||
title: { type: String, length: 255, index: true },
|
title: { type: String, length: 255, index: true },
|
||||||
content: { type: String },
|
content: { type: String },
|
||||||
comments: [String]
|
comments: [String]
|
||||||
});
|
});
|
||||||
|
ds.automigrate('Post', done);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('works without options on create (promise variant)', function(done) {
|
it('works without options on create (promise variant)', function(done) {
|
||||||
|
@ -910,12 +911,13 @@ describe('manipulation', function () {
|
||||||
var postInstance;
|
var postInstance;
|
||||||
var Post;
|
var Post;
|
||||||
var ds = getSchema();
|
var ds = getSchema();
|
||||||
before(function () {
|
before(function (done) {
|
||||||
Post = ds.define('Post', {
|
Post = ds.define('Post', {
|
||||||
title: {type: String, length: 255, index: true},
|
title: {type: String, length: 255, index: true},
|
||||||
content: {type: String},
|
content: {type: String},
|
||||||
comments: [String]
|
comments: [String]
|
||||||
});
|
});
|
||||||
|
ds.automigrate('Post', done);
|
||||||
});
|
});
|
||||||
beforeEach(function (done) {
|
beforeEach(function (done) {
|
||||||
Post.destroyAll(function () {
|
Post.destroyAll(function () {
|
||||||
|
|
Loading…
Reference in New Issue