Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Commit

Permalink
Setup test definitions for new features
Browse files Browse the repository at this point in the history
  • Loading branch information
bencevans committed Nov 27, 2013
1 parent 94e00a5 commit 2a52d11
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions test/sequelize_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
})
});

});

0 comments on commit 2a52d11

Please sign in to comment.