Navigation Menu

Skip to content

Commit

Permalink
Update test for newly created domain
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Aug 2, 2012
1 parent eba9bd5 commit e0a0789
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/database-domain.test.js
Expand Up @@ -215,13 +215,17 @@ suite('database', function() {
temporaryDatabase = undefined;
});

test('id from database (known table)', function() {
test('id for database (known table)', function() {
assert.equal(domain.id, 'id0123');
});

test('id from database (unknown table)', function() {
test('id for database (unknown, new table)', function() {
domain = new Domain('unknown', context);
assert.equal(domain.id, Domain.DEFAULT_ID);
assert.equal(typeof domain.id, 'string');
assert.deepEqual({ length: domain.id.length,
normalized: domain.id.replace(/[0-9][a-z]/g, '0') },
{ length: 26,
normalized: Domain.DEFAULT_ID });
});

test('indexFields', function() {
Expand Down

0 comments on commit e0a0789

Please sign in to comment.