unit tests for user controller