Unit test that _if propagates errors correctly