From 086cf8e9fbd99b9d16423a8f396fddf64eddf097 Mon Sep 17 00:00:00 2001 From: Phillip Davis Date: Tue, 3 Mar 2026 16:08:11 -0500 Subject: [PATCH] test(port-out-pin): mismatched pins returns error --- test/property/test_port_out_pin.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/property/test_port_out_pin.rb b/test/property/test_port_out_pin.rb index a449fe0d4b019182d9fcdcc9fc85485cd259c1c3..039717872ada7a48de2c81f135eb3d05dca7680d 100644 --- a/test/property/test_port_out_pin.rb +++ b/test/property/test_port_out_pin.rb @@ -124,4 +124,24 @@ class PortOutPinPropertyTest < Minitest::Test } end em :test_complete_nil_pin_returns_error + + def test_complete_mismatched_pins_returns_error + property_of { + PortOutPinCompleteCmd + .new(REDIS) + .confirm_pin { |_pin| + sized(range(4, 10)) { string(:alnum) } + "X" + } + .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_mismatched_pins_returns_error end