diff --git a/test/property/test_port_out_pin.rb b/test/property/test_port_out_pin.rb index 039717872ada7a48de2c81f135eb3d05dca7680d..1d8a0cfaa122ad2ab24ee246c6f0aa4c176b580e 100644 --- a/test/property/test_port_out_pin.rb +++ b/test/property/test_port_out_pin.rb @@ -144,4 +144,23 @@ class PortOutPinPropertyTest < Minitest::Test } end em :test_complete_mismatched_pins_returns_error + + def test_complete_invalid_pin_format_returns_error + property_of { + PortOutPinCompleteCmd + .new(REDIS) + .pin { choose("ab", "a" * 11, "pin!@#") } + .confirm_pin { |pin| pin } + .generate + }.check { |_metadata, example| + process_stanza(example['stanza']) + + assert_equal 1, written.length + reply = written.shift + assert_kind_of Blather::StanzaError, reply + assert_equal :modify, reply.type + assert_equal :bad_request, reply.name + } + end + em :test_complete_invalid_pin_format_returns_error end