write tests for users_controller api