refactored user resource test