YUKI Hiroshi
null+****@clear*****
Fri Nov 16 16:53:14 JST 2012
YUKI Hiroshi 2012-11-16 16:53:14 +0900 (Fri, 16 Nov 2012) New Revision: 79004c95de01fd938b6d47c238da559268b176f7 https://github.com/groonga/gcs/commit/79004c95de01fd938b6d47c238da559268b176f7 Log: Add test for validation abour null index field type Modified files: test/database-index-field.test.js Modified: test/database-index-field.test.js (+9 -0) =================================================================== --- test/database-index-field.test.js 2012-11-16 16:44:10 +0900 (6f819d0) +++ test/database-index-field.test.js 2012-11-16 16:53:14 +0900 (49b979b) @@ -94,6 +94,15 @@ suite('database', function() { IndexField.VALID_NAME_PATTERN); }); + test('null type', function() { + var field = new IndexField('foo', domain); + assert.throw(function() { + field.type = null; + }, '1 validation error detected: ' + + 'Value null at \'%TYPE_FIELD%\' failed to satisfy constraint: ' + + 'Member must not be null'); + }); + test('unknown type', function() { var field = new IndexField('foo', domain); assert.throw(function() { -------------- next part -------------- HTML����������������������������...Download