Added Unit test cases for the User Controller and Login Controller.
Added create function in user_tenant repository to fix the bug where a newly created user tries to get its bearer token using auth/token API. Previously there was no user_tenant record found in the database corresponding to a user record in the createJWT function.
Fixes #43 , #42 , #36
Type of change
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Intermediate change (work in progress)
How Has This Been Tested ?
[x] Using the npm test, I verified that all the test cases are successful.
[x] Successfully got the Bearer token of a newly created user.
Checklist :
[x] Performed a self-review of my own code
[x] npm test passes on your machine
[x] New tests added or existing tests modified to cover all changes
Description
Fixes #43 , #42 , #36
Type of change
How Has This Been Tested ?
Checklist :