We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ede6d1 commit 65f794dCopy full SHA for 65f794d
test-harness/tests/specs/DocumentSpec.cfc
@@ -64,6 +64,22 @@ component extends="BaseOpenAPISpec"{
64
});
65
66
} );
67
+
68
+ describe( "Core functionality tests", function(){
69
70
+ it( "Tests that an attempt to locate an invalid path with return a $ref object", function(){
71
+ var DocumentObject = getInstance( "OpenAPIDocument@SwaggerSDK" ).init( VARIABLES.testDocument );
72
73
+ expect( DocumentObject )
74
+ .toBeComponent()
75
+ .toHaveKey( "getDocument" );
76
77
+ var invalidPath = DocumentObject.locate( "foo.bar" );
78
+ expect( invalidPath ).toBeStruct().toHaveKey( "$ref" );
79
+ expect( invalidPath[ "$ref" ] ).toBe( "##/foo/bar" );
80
81
+ })
82
83
}
84
85
0 commit comments