Revision 9f88e8a1
Added by Tom Caspy almost 9 years ago
test/unit/classification_test.rb | ||
---|---|---|
context 'lookup value type cast error' do
|
||
setup do
|
||
@lookup_key = mock('lookup_key')
|
||
@lookup_key.expects(:cast_validate_value).raises(TypeError)
|
||
@lookup_key.expects(:key_type).returns('footype')
|
||
Foreman::Parameters::Caster.any_instance.expects(:cast).raises(TypeError)
|
||
@lookup_key.expects(:key_type).twice.returns('footype')
|
||
end
|
||
|
||
test 'TypeError exceptions are logged' do
|
Also available in: Unified diff
fixes #10232 - moving validations and casting out of lookup key and value