Writing tests for registration form errors