不要怂,就是干,撸起袖子干!

Commit e7b06830 by sdepold

spec for empty migrations

1 parent 9bab0d9c
module.exports = {
up: function() {},
down: function() {}
}
...@@ -85,7 +85,7 @@ describe('Migrator', function() { ...@@ -85,7 +85,7 @@ describe('Migrator', function() {
SequelizeMeta.create({ lastMigrationId: '20111117063700' }).success(function() { SequelizeMeta.create({ lastMigrationId: '20111117063700' }).success(function() {
migrator.getUndoneMigrations(function(err, migrations) { migrator.getUndoneMigrations(function(err, migrations) {
expect(err).toBeFalsy() expect(err).toBeFalsy()
expect(migrations.length).toEqual(1) expect(migrations.length).toEqual(2)
expect(migrations[0].filename).toEqual('20111123060700-addBirthdateToPerson.js') expect(migrations[0].filename).toEqual('20111123060700-addBirthdateToPerson.js')
done() done()
}) })
...@@ -140,5 +140,18 @@ describe('Migrator', function() { ...@@ -140,5 +140,18 @@ describe('Migrator', function() {
}).error(function(err){ console.log(err); done() }) }).error(function(err){ console.log(err); done() })
}) })
}) })
it("executes the empty migration #20111130161100", function() {
Helpers.async(function(done) {
setup({ from: 20111130161100, to: 20111130161100})
done()
})
Helpers.async(function(done) {
migrator.migrate().success(done).error(function(err) { console.log(err) })
// this migration isn't actually testing anything but
// should not timeout
})
})
}) })
}) })
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!