From 2a52d110a3311635586f12de54f684d8589db4fa Mon Sep 17 00:00:00 2001 From: Ben Evans Date: Wed, 27 Nov 2013 13:30:19 +0000 Subject: [PATCH] Setup test definitions for new features --- test/sequelize_test.js | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/test/sequelize_test.js b/test/sequelize_test.js index 0b8044a..ba7f87d 100644 --- a/test/sequelize_test.js +++ b/test/sequelize_test.js @@ -33,18 +33,33 @@ describe('grunt-sequelize', function() { }); }); describe('with a migration argument', function() { + describe('where the migration is the same as the current state of the database', function() { + it('should just inform the user'); + }); + describe('where the migration is higher than the current state of the database', function(){ + it('should migrate to the specified migration'); + }); + describe('where the migration is lower than the current state of the database', function(){ + it('should migrate to the specified migration'); + }); }); }); describe('sequelize:undo', function() { - it('should undo the last migration', function(done) { - grunt.util.spawn({ grunt: true, args: ['sequelize:undo'] }, function(error, result) { - console.log(result); - assert.equal(result.code, 0); - done(); + describe('without any arguments', function() { + it('should undo the last migration', function(done) { + grunt.util.spawn({ grunt: true, args: ['sequelize:undo'] }, function(error, result) { + console.log(result); + assert.equal(result.code, 0); + // TODO assert migration ID === last ID + done(); + }); }); }); + describe('with a set number to undo', function() { + it('should migrate downwards by the given number of migrations'); + }) }); });