It used to handle the initial failure differently than internal failure.
Now I've moved the outside bits inside, so it can run again when it
encounters an unknown character.
@@ -129,10 +129,4 @@ class CustomerInfoTest < Minitest::Test
assert_mock trust_repo
end
em :test_inactive_admin_info_does_not_crash
-- def test_missing_customer_admin_info_does_not_crash- cust = CustomerInfoForm::NoCustomer.new- assert cust.admin_info.form- end- em :test_missing_customer_admin_info_does_not_crash
end
@@ -48,10 +48,7 @@ class CustomerInfoFormTest < Minitest::Test
end
def test_nothing
- assert_kind_of(- CustomerInfoForm::NoCustomer,- @info_form.parse_something("").sync- )
+ assert_nil(@info_form.parse_something("").sync)
end
em :test_nothing
@@ -101,19 +98,13 @@ class CustomerInfoFormTest < Minitest::Test
def test_missing_customer_by_phone
result = @info_form.parse_something("+17778889999").sync
- assert_kind_of(- CustomerInfoForm::NoCustomer,- result- )
+ assert_nil(result)
end
em :test_missing_customer_by_phone
def test_garbage
result = @info_form.parse_something("garbage").sync
- assert_kind_of(- CustomerInfoForm::NoCustomer,- result- )
+ assert_nil(result)
end
em :test_garbage
end