added ifError assertions to test