Adds very basic test coverage for /user/password for:
422 response code for missing required body parameters and error property in response.
200 response from each of the required body parameters:
user_id
email
mobile
To Test:
$npm test
currently produces:
5) Requests to the root (/user/password) path with missing required body parameters. POST: Invalid password reset request with missing body parameters returns expected 422 - Unprocessable due to request validation error results.:
Uncaught Error: expected 422 "Unprocessable Entity", got 404 "Not Found"
at Test._assertStatus (node_modules/supertest/lib/test.js:232:12)
at Test._assertFunction (node_modules/supertest/lib/test.js:247:11)
at Test.assert (node_modules/supertest/lib/test.js:148:18)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at net.js:1419:10
6) Requests to the root (/user/password) path POST: Valid password request with only user_id returns expected results.:
Uncaught Error: expected 200 "OK", got 404 "Not Found"
at Test._assertStatus (node_modules/supertest/lib/test.js:232:12)
at Test._assertFunction (node_modules/supertest/lib/test.js:247:11)
at Test.assert (node_modules/supertest/lib/test.js:148:18)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at net.js:1419:10
7) Requests to the root (/user/password) path POST: Valid password request with only email returns expected results.:
Uncaught Error: expected 200 "OK", got 404 "Not Found"
at Test._assertStatus (node_modules/supertest/lib/test.js:232:12)
at Test._assertFunction (node_modules/supertest/lib/test.js:247:11)
at Test.assert (node_modules/supertest/lib/test.js:148:18)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at net.js:1419:10
8) Requests to the root (/user/password) path POST: Valid password request with only mobile returns expected results.:
Uncaught Error: expected 201 "Created", got 404 "Not Found"
at Test._assertStatus (node_modules/supertest/lib/test.js:232:12)
at Test._assertFunction (node_modules/supertest/lib/test.js:247:11)
at Test.assert (node_modules/supertest/lib/test.js:148:18)
at Server.assert (node_modules/supertest/lib/test.js:127:12)
at net.js:1419:10
Fixes #33
Adds very basic test coverage for
/user/password
for:422
response code for missing required body parameters anderror
property in response.200
response from each of the required body parameters:user_id
email
mobile
To Test:
currently produces:
References: