YUKI Hiroshi
null+****@clear*****
Thu Aug 23 14:40:17 JST 2012
YUKI Hiroshi 2012-08-23 14:40:17 +0900 (Thu, 23 Aug 2012) New Revision: 41aaeee770451bbc629f792f62152d27009a1a49 https://github.com/groonga/gcs/commit/41aaeee770451bbc629f792f62152d27009a1a49 Log: Update tests around new behavior of index field options Modified files: test/database-index-field.test.js test/gcs-commands.test.js Modified: test/database-index-field.test.js (+4 -0) =================================================================== --- test/database-index-field.test.js 2012-08-23 14:35:12 +0900 (7d54cfe) +++ test/database-index-field.test.js 2012-08-23 14:40:17 +0900 (c04f42b) @@ -257,6 +257,7 @@ suite('database', function() { test('invalid modification of options for text field', function() { var field = new IndexField('name', domain).setType('text'); field.createSync(); + field.searchEnabled = true; assert.throw(function() { field.searchEnabled = false; }, 'searchable option cannot be configured for the type text'); @@ -265,12 +266,15 @@ suite('database', function() { test('invalid modification of options for uint field', function() { var field = new IndexField('age', domain).setType('uint'); field.createSync(); + field.searchEnabled = true; assert.throw(function() { field.searchEnabled = false; }, 'searchable option cannot be configured for the type uint'); + field.facetEnabled = false; assert.throw(function() { field.facetEnabled = false; }, 'facet option cannot be configured for the type uint'); + field.resultEnabled = true; assert.throw(function() { field.resultEnabled = false; }, 'returnable option cannot be configured for the type uint'); Modified: test/gcs-commands.test.js (+4 -4) =================================================================== --- test/gcs-commands.test.js 2012-08-23 14:35:12 +0900 (e259ce3) +++ test/gcs-commands.test.js 2012-08-23 14:40:17 +0900 (c52a957) @@ -560,7 +560,7 @@ suite('gcs-configure-fields', function() { test('change option of text field', function(done) { testConfigureFieldOptions('text', { - search: 'error', + search: 'Search', nosearch: 'error', facet: 'Search Facet', nofacet: 'Search', @@ -571,11 +571,11 @@ suite('gcs-configure-fields', function() { test('change option of uint field', function(done) { testConfigureFieldOptions('uint', { - search: 'error', + search: 'Search Result', nosearch: 'error', facet: 'error', - nofacet: 'error', - result: 'error', + nofacet: 'Search Result', + result: 'Search Result', noresult: 'error' }, done); }); -------------- next part -------------- HTML����������������������������...Download