Writing tests for user registration