Skip to content

Commit df0d5bb

Browse files
committed
Updated test expectation
Because we look for $extend keys recursively through the document object, we can no longer have nested Parser objects. We shouldn't need them anyway. The top level Parser should be enough.
1 parent 3226425 commit df0d5bb

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

test-harness/tests/specs/ParserSpec.cfc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,15 @@ component extends="BaseOpenAPISpec"{
5858
function runParserRecursionTests( required Parser, required boolean testObjects=false ){
5959
if( ARGUMENTS.testObjects ){
6060

61-
it( "Tests for the recursive presence of OpenAPIDocument objects within Parser #Parser.getSchemaType()# document object" , function(){
61+
it( "Tests for the recursive presence of structs within Parser #Parser.getSchemaType()# document object" , function(){
6262
var ParserDoc = Parser.getDocumentObject();
6363
expect( ParserDoc ).toBeInstanceOf( "Document" );
6464
expect( ParserDoc ).toHaveKey( "getDocument" );
6565
var APIDoc = ParserDoc.getDocument();
6666
expect( APIDoc ).toBeStruct();
6767
expect( APIDoc ).toHaveKey( "paths" );
68-
expect( APIDoc.paths ).toBeInstanceOf( "Parser" );
69-
runParserTypeChecks( APIDoc.paths );
70-
var paths = APIDoc.paths.getDocumentObject().getNormalizedDocument();
71-
expect( paths ).toHaveKey( "/pets" );
72-
73-
68+
expect( APIDoc.paths ).toBeStruct();
69+
expect( APIDoc.paths ).toHaveKey( "/pets" );
7470
});
7571

7672
}

0 commit comments

Comments
 (0)