diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/issue-tracker.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/issue-tracker.md index cb4969f0de..43b5fd1fe5 100644 --- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/issue-tracker.md +++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/issue-tracker.md @@ -19,12 +19,29 @@ When you are done, make sure a working demo of your project is hosted somewhere ## Instructions
-- Complete the neccessary routes in `/routes/api.js` +- Complete the necessary routes in `/routes/api.js` - Create all of the functional tests in `tests/2_functional-tests.js` - Copy the `sample.env` file to `.env` and set the variables appropriately - To run the tests uncomment `NODE_ENV=test` in your `.env` file - To run the tests in the console, use the command `npm run test`. To open the Repl.it console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell" +Write the following tests in `tests/2_functional-tests.js`: + +- Create an issue with every field: POST request to `/api/issues/{project}` +- Create an issue with only required fields: POST request to `/api/issues/{project}` +- Create an issue with missing required fields: POST request to `/api/issues/{project}` +- View issues on a project: GET request to `/api/issues/{project}` +- View issues on a project with one filter: GET request to `/api/issues/{project}` +- View issues on a project with multiple filters: GET request to `/api/issues/{project}` +- Update one field on an issue: PUT request to `/api/issues/{project}` +- Update multiple fields on an issue: PUT request to `/api/issues/{project}` +- Update an issue with missing `_id`: PUT request to `/api/issues/{project}` +- Update an issue with no fields to update: PUT request to `/api/issues/{project}` +- Update an issue with an invalid `_id`: PUT request to `/api/issues/{project}` +- Delete an issue: DELETE request to `/api/issues/{project}` +- Delete an issue with an invalid `_id`: DELETE request to `/api/issues/{project}` +- Delete an issue with missing `_id`: DELETE request to `/api/issues/{project}` +
## Tests