Navigation Menu

Skip to content

Commit

Permalink
Add more test for cs-describe-domain
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Aug 6, 2012
1 parent f16aca0 commit 4dbf9e5
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions test/cs-commands.test.js
Expand Up @@ -106,10 +106,37 @@ suite('cs-describe-domain', function() {
].join('\n');
}

test('describe one', function(done) {
utils
.run('cs-create-domain',
'--domain-name', 'domain2',
'--database-path', temporaryDatabase.path)
.run('cs-create-domain',
'--domain-name', 'domain1',
'--database-path', temporaryDatabase.path)
.run('cs-describe-domain',
'--domain-name', 'domain1',
'--database-path', temporaryDatabase.path)
.next(function(result) {
assert.equal(result.code, 0);
assert.include(result.output.stdout,
report(new Domain('domain1', context), 'localhost'));

done();
})
.error(function(e) {
done(e);
});
});

test('describe all', function(done) {
new Domain('domain2', context).createSync();
new Domain('domain1', context).createSync();
utils
.run('cs-create-domain',
'--domain-name', 'domain2',
'--database-path', temporaryDatabase.path)
.run('cs-create-domain',
'--domain-name', 'domain1',
'--database-path', temporaryDatabase.path)
.run('cs-describe-domain',
'--show-all',
'--database-path', temporaryDatabase.path)
Expand Down

0 comments on commit 4dbf9e5

Please sign in to comment.