Expectation::toHaveKeyValue
Member of Expectation
idl
Expectation.toHaveKeyValue, key, value, $
/_expect_failureVerifies that the expectation value (a hash, orderedhash, or dictionary) has a key whose value equals another value. See idl toContainEqual for how values are compared.
Examples
idl
(it.expects(hash('name', 'luna'))).toHaveKeyValue, 'name', 'luna'
(it.expects(hash('name', 'luna')))._not_.toHaveKeyValue, 'name', 'sol'Arguments
key
requiredinputtype=String | NumberSpecify the key to look for.
value
requiredinputtype=anySpecify the value expected for the key.
Keywords
_expect_failure {#kw-_expect_failure}
optionalinputtype=BooleanIf the test fails for some reason, set this to force passing because we expected failure. This keyword is for internal use only.