writing tests for user registration