@@ 631,22 631,23 @@ class RegistrationTest < Minitest::Test
</OrderResponse>
RESPONSE
- Command::COMMAND_MANAGER.expect(
- :write,
- EMPromise.reject(:test_result),
- [Matching.new do |iq|
- assert_equal :form, iq.form.type
- assert_equal(
- "The JMP number +15555550000 is no longer available.",
- iq.form.instructions
- )
- end]
- )
+ result = execute_command do
+ Command::COMMAND_MANAGER.expect(
+ :write,
+ EMPromise.reject(:test_result),
+ [Matching.new do |iq|
+ assert_equal :form, iq.form.type
+ assert_equal(
+ "The JMP number +15555550000 is no longer available.",
+ iq.form.instructions
+ )
+ end]
+ )
- assert_equal(
- :test_result,
- execute_command { @finish.write.catch { |e| e } }
- )
+ @finish.write.catch { |e| e }
+ end
+
+ assert_equal :test_result, result
assert_mock Command::COMMAND_MANAGER
assert_instance_of(
TelSelections::ChooseTel,