File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ var testconfig = require('../etc/test-config-qa.js');
1919
2020var marklogic = require ( '../' ) ;
2121var q = marklogic . queryBuilder ;
22+ var ctsQueryBldr = marklogic . ctsQueryBuilder ;
2223
2324var db = marklogic . createDatabaseClient ( testconfig . restReaderConnection ) ;
2425var dbWriter = marklogic . createDatabaseClient ( testconfig . restWriterConnection ) ;
@@ -427,7 +428,20 @@ describe('Document query test', function(){
427428 } , done ) ;
428429 } ) ;
429430
430- it ( 'should do false query' , function ( done ) {
431+ it ( 'ctsQueryBuilder one query' , function ( done ) {
432+ db . documents . query (
433+ q . where (
434+ ctsQueryBldr . cts . andQuery ( ctsQueryBldr . cts . wordQuery ( "groundbreaking" ) )
435+ ) ) . result ( function ( response ) {
436+ //console.log(JSON.stringify(response, null, 4));
437+ response . length . should . equal ( 1 ) ;
438+ response [ 0 ] . content . id . should . equal ( '0013' ) ;
439+ response [ 0 ] . uri . should . equal ( '/test/query/matchDir/doc3.json' ) ;
440+ done ( ) ;
441+ } , done ) ;
442+ } ) ;
443+
444+ it ( 'should do false query' , function ( done ) {
431445 db . documents . query (
432446 q . where (
433447 q . falseQuery ( )
You can’t perform that action at this time.
0 commit comments