Update userTest.js

Added tests for the changes made in 972c19d95647685d15d829d9d4c00c46eaca3f11