lucee.Componentcoldbox.system.testing.CustomMatchers
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- All the custom matchers ColdBox registers within TestBox for easier testing!
Method Summary | |
---|---|
any
|
toHaveInvalidData([any expectation], [any args='[runtime expression]'])
Expectation for testing again cbValidation invalid data fields returned in a Restful response. |
any
|
toHaveStatus([any expectation], [any args='[runtime expression]'])
Checks if the ColdBox response obejct has a matched status code. |
Methods inherited from class lucee.Component |
---|
None |
Method Detail |
---|
Expectation for testing again cbValidation invalid data fields returned in a Restful response by looking into the response object
expect( event.getResponse() ).toHaveInvalidData( "username", "is required" ) expect( event.getResponse() ).toHaveInvalidData( "role", "is required" ) expect( event.getResponse() ).toHaveInvalidData( "permission", "is not unique" ) expect( event.getResponse() ).toHaveInvalidData( "status", "does not match" )
expectation
args
Checks if the ColdBox response obejct has a matched status code
expect( event.getResponse() ).toHaveStatus( statusCode );
expectation
args