[Groonga-commit] groonga/gcs [master] Update test for newly created domain

Back to archive index

null+****@clear***** null+****@clear*****
2012年 8月 2日 (木) 12:29:01 JST


SHIMODA Hiroshi	2012-08-02 12:29:01 +0900 (Thu, 02 Aug 2012)

  New Revision: e0a078944ef61740491f6feacbf586a3ce6d92f7
  https://github.com/groonga/gcs/commit/e0a078944ef61740491f6feacbf586a3ce6d92f7

  Log:
    Update test for newly created domain

  Modified files:
    test/database-domain.test.js

  Modified: test/database-domain.test.js (+7 -3)
===================================================================
--- test/database-domain.test.js    2012-08-02 12:25:43 +0900 (4b5f898)
+++ test/database-domain.test.js    2012-08-02 12:29:01 +0900 (c9c5043)
@@ -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() {
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
Download 



Groonga-commit メーリングリストの案内
Back to archive index