Skip to content

Commit

Permalink
Added test for destroy beforeRun
Browse files Browse the repository at this point in the history
  • Loading branch information
trabus committed May 22, 2015
1 parent 4d8b248 commit ea34437
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/unit/commands/destroy-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,14 @@ describe('generate command', function() {
'For more details, use `ember help`.');
});
});

it('rethrows errors from beforeRun', function() {
return Promise.resolve(function(){ return command.beforeRun(['controller', 'foo']);})
.then(function() {
expect(false, 'should not have called run');
})
.catch(function(error) {
expect(error.message).to.equal('undefined is not a function');
});
});
});

0 comments on commit ea34437

Please sign in to comment.