~singpolyma/sgx-jmp

6075955323b23d742f2963a59b370b337512eb45 — Stephen Paul Weber 1 year, 2 months ago 691c5d6
Fix test so you get a better error on failure
1 files changed, 16 insertions(+), 15 deletions(-)

M test/test_registration.rb
M test/test_registration.rb => test/test_registration.rb +16 -15
@@ 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,