Navigation Menu

Skip to content

Commit

Permalink
Add test for cs-delete-domain
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Aug 6, 2012
1 parent 177e0ee commit 28432ed
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion test/cs-commands.test.js
Expand Up @@ -121,12 +121,29 @@ suite('cs-delete-domain', function() {
});
});

test('delete unexisting domain', function(done) {
test('delete not-existing domain', function(done) {
utils
.run('cs-delete-domain',
'--domain-name', 'test',
'--force',
'--database-path', temporaryDatabase.path)
.next(function(result) {
assert.deepEqual({ code: result.code,
message: result.output.stdout },
{ code: 1,
message: 'You must specify an existing domain name\n' });
done();
})
.error(function(e) {
done(e);
});
});

test('delete without domain', function(done) {
utils
.run('cs-delete-domain',
'--force',
'--database-path', temporaryDatabase.path)
.next(function(result) {
assert.deepEqual({ code: result.code,
message: result.output.stdout },
Expand Down

0 comments on commit 28432ed

Please sign in to comment.