{"action":"created","comment":{"url":"https://api.github.com/repos/phemonick/Book-A-Meal/pulls/comments/217610051","pull_request_review_id":155364566,"id":217610051,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzYxMDA1MQ==","diff_hunk":"@@ -43,5 +43,102 @@ describe('Middleware Test Suite', () => {\n         if (error) done(error);\n         done();\n       });\n-  })\n-})\n\\ No newline at end of file\n+  });\n+\n+  it('should return error if meal order is not an array', (done) => {\n+    request(server)\n+      .post('/api/v1/orders')\n+      .set('Authorization', kunleToken)\n+      .send(orderCredential.invalidOrder)\n+      .end((error, res) => {\n+        expect(res.status).to.equal(400);\n+        expect(res.body.message).to.include('meals must be an array of orders');\n+        if (error) done(error);\n+        done();\n+      });\n+  });\n+\n+  it(`should return error if meal Id and quantity is invalid,\n+   when requesting for an order`, (done) => {\n+    request(server)\n+      .post('/api/v1/orders')\n+      .set('Authorization', kunleToken)\n+      .send(orderCredential.nikeOrder)\n+      .end((error, res) => {\n+        expect(res.status).to.equal(400);\n+        expect(res.body.message).to.include('Meal Id and quantity must be an Integer');\n+        if (error) done(error);\n+        done();\n+      });\n+  });\n+\n+  it('should return error if an order is empty', (done) => {\n+    request(server)\n+      .post('/api/v1/orders')\n+      .set('Authorization', kunleToken)\n+      .send(orderCredential.emptyOrder)\n+      .end((error, res) => {\n+        expect(res.status).to.equal(400);\n+        expect(res.body.message).to.include('Order input Errors');\n+        expect(res.body.errorMessage[0]).to.include('input meal Orders');\n+        if (error) done(error);\n+        done();\n+      });\n+  });\n+\n+  it('should throw an error with invalid menu date', (done) => {\n+    request(server)\n+      .get('/api/v1/menu/?date=20-19-2018')\n+      .set('Authorization', kunleToken)\n+      .end((error, res) => {\n+        expect(res.status).to.equal(400);\n+        expect(res.body.success).to.be.false;\n+        expect(res.body.message).to.include('invalid date input');\n+        if (error) done(error);\n+        done();\n+      });\n+  });\n+","path":"__tests__/test/middleware/validate.spec.js","position":53,"original_position":94,"commit_id":"8d8364905a693cb673c8f19a6ce9925d8e40d196","original_commit_id":"8d8364905a693cb673c8f19a6ce9925d8e40d196","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Line 102 exceeds the maximum line length of 80       max-len","created_at":"2018-09-14T06:19:26Z","updated_at":"2018-09-14T06:19:27Z","html_url":"https://github.com/phemonick/Book-A-Meal/pull/82#discussion_r217610051","pull_request_url":"https://api.github.com/repos/phemonick/Book-A-Meal/pulls/82","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/phemonick/Book-A-Meal/pulls/comments/217610051"},"html":{"href":"https://github.com/phemonick/Book-A-Meal/pull/82#discussion_r217610051"},"pull_request":{"href":"https://api.github.com/repos/phemonick/Book-A-Meal/pulls/82"}}},"pull_request":{"url":"https://api.github.com/repos/phemonick/Book-A-Meal/pulls/82","id":215421550,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1NDIxNTUw","html_url":"https://github.com/phemonick/Book-A-Meal/pull/82","diff_url":"https://github.com/phemonick/Book-A-Meal/pull/82.diff","patch_url":"https://github.com/phemonick/Book-A-Meal/pull/82.patch","issue_url":"https://api.github.com/repos/phemonick/Book-A-Meal/issues/82","number":82,"state":"open","locked":false,"title":"Chore/160427792/component test","user":{"login":"phemonick","id":23261181,"node_id":"MDQ6VXNlcjIzMjYxMTgx","avatar_url":"https://avatars2.githubusercontent.com/u/23261181?v=4","gravatar_id":"","url":"https://api.github.com/users/phemonick","html_url":"https://github.com/phemonick","followers_url":"https://api.github.com/users/phemonick/followers","following_url":"https://api.github.com/users/phemonick/following{/other_user}","gists_url":"https://api.github.com/users/phemonick/gists{/gist_id}","starred_url":"https://api.github.com/users/phemonick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phemonick/subscriptions","organizations_url":"https://api.github.com/users/phemonick/orgs","repos_url":"https://api.github.com/users/phemonick/repos","events_url":"https://api.github.com/users/phemonick/events{/privacy}","received_events_url":"https://api.github.com/users/phemonick/received_events","type":"User","site_admin":false},"body":" #### What does this PR do?\r\ntest react application\r\n#### Description of Task to be completed?\r\nclient side test\r\n#### How should this be manually tested?\r\nnpm run test:client\r\n#### Any background context you want to provide?\r\nN/A\r\n#### What are the relevant pivotal tracker stories? (If applicable)\r\n#160427792\r\n#### Screenshots (If applicable)\r\nN/A","created_at":"2018-09-13T21:28:32Z","updated_at":"2018-09-14T06:19:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49a88dff7955fda8da28b5d28d4fb4fa4abf914e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/phemonick/Book-A-Meal/pulls/82/commits","review_comments_url":"https://api.github.com/repos/phemonick/Book-A-Meal/pulls/82/comments","review_comment_url":"https://api.github.com/repos/phemonick/Book-A-Meal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phemonick/Book-A-Meal/issues/82/comments","statuses_url":"https://api.github.com/repos/phemonick/Book-A-Meal/statuses/8d8364905a693cb673c8f19a6ce9925d8e40d196","head":{"label":"phemonick:chore/160427792/component-test","ref":"chore/160427792/component-test","sha":"8d8364905a693cb673c8f19a6ce9925d8e40d196","user":{"login":"phemonick","id":23261181,"node_id":"MDQ6VXNlcjIzMjYxMTgx","avatar_url":"https://avatars2.githubusercontent.com/u/23261181?v=4","gravatar_id":"","url":"https://api.github.com/users/phemonick","html_url":"https://github.com/phemonick","followers_url":"https://api.github.com/users/phemonick/followers","following_url":"https://api.github.com/users/phemonick/following{/other_user}","gists_url":"https://api.github.com/users/phemonick/gists{/gist_id}","starred_url":"https://api.github.com/users/phemonick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phemonick/subscriptions","organizations_url":"https://api.github.com/users/phemonick/orgs","repos_url":"https://api.github.com/users/phemonick/repos","events_url":"https://api.github.com/users/phemonick/events{/privacy}","received_events_url":"https://api.github.com/users/phemonick/received_events","type":"User","site_admin":false},"repo":{"id":129736532,"node_id":"MDEwOlJlcG9zaXRvcnkxMjk3MzY1MzI=","name":"Book-A-Meal","full_name":"phemonick/Book-A-Meal","owner":{"login":"phemonick","id":23261181,"node_id":"MDQ6VXNlcjIzMjYxMTgx","avatar_url":"https://avatars2.githubusercontent.com/u/23261181?v=4","gravatar_id":"","url":"https://api.github.com/users/phemonick","html_url":"https://github.com/phemonick","followers_url":"https://api.github.com/users/phemonick/followers","following_url":"https://api.github.com/users/phemonick/following{/other_user}","gists_url":"https://api.github.com/users/phemonick/gists{/gist_id}","starred_url":"https://api.github.com/users/phemonick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phemonick/subscriptions","organizations_url":"https://api.github.com/users/phemonick/orgs","repos_url":"https://api.github.com/users/phemonick/repos","events_url":"https://api.github.com/users/phemonick/events{/privacy}","received_events_url":"https://api.github.com/users/phemonick/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phemonick/Book-A-Meal","description":"an application that allows customers to make food orders","fork":false,"url":"https://api.github.com/repos/phemonick/Book-A-Meal","forks_url":"https://api.github.com/repos/phemonick/Book-A-Meal/forks","keys_url":"https://api.github.com/repos/phemonick/Book-A-Meal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phemonick/Book-A-Meal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phemonick/Book-A-Meal/teams","hooks_url":"https://api.github.com/repos/phemonick/Book-A-Meal/hooks","issue_events_url":"https://api.github.com/repos/phemonick/Book-A-Meal/issues/events{/number}","events_url":"https://api.github.com/repos/phemonick/Book-A-Meal/events","assignees_url":"https://api.github.com/repos/phemonick/Book-A-Meal/assignees{/user}","branches_url":"https://api.github.com/repos/phemonick/Book-A-Meal/branches{/branch}","tags_url":"https://api.github.com/repos/phemonick/Book-A-Meal/tags","blobs_url":"https://api.github.com/repos/phemonick/Book-A-Meal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phemonick/Book-A-Meal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phemonick/Book-A-Meal/git/refs{/sha}","trees_url":"https://api.github.com/repos/phemonick/Book-A-Meal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phemonick/Book-A-Meal/statuses/{sha}","languages_url":"https://api.github.com/repos/phemonick/Book-A-Meal/languages","stargazers_url":"https://api.github.com/repos/phemonick/Book-A-Meal/stargazers","contributors_url":"https://api.github.com/repos/phemonick/Book-A-Meal/contributors","subscribers_url":"https://api.github.com/repos/phemonick/Book-A-Meal/subscribers","subscription_url":"https://api.github.com/repos/phemonick/Book-A-Meal/subscription","commits_url":"https://api.github.com/repos/phemonick/Book-A-Meal/commits{/sha}","git_commits_url":"https://api.github.com/repos/phemonick/Book-A-Meal/git/commits{/sha}","comments_url":"https://api.github.com/repos/phemonick/Book-A-Meal/comments{/number}","issue_comment_url":"https://api.github.com/repos/phemonick/Book-A-Meal/issues/comments{/number}","contents_url":"https://api.github.com/repos/phemonick/Book-A-Meal/contents/{+path}","compare_url":"https://api.github.com/repos/phemonick/Book-A-Meal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phemonick/Book-A-Meal/merges","archive_url":"https://api.github.com/repos/phemonick/Book-A-Meal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phemonick/Book-A-Meal/downloads","issues_url":"https://api.github.com/repos/phemonick/Book-A-Meal/issues{/number}","pulls_url":"https://api.github.com/repos/phemonick/Book-A-Meal/pulls{/number}","milestones_url":"https://api.github.com/repos/phemonick/Book-A-Meal/milestones{/number}","notifications_url":"https://api.github.com/repos/phemonick/Book-A-Meal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phemonick/Book-A-Meal/labels{/name}","releases_url":"https://api.github.com/repos/phemonick/Book-A-Meal/releases{/id}","deployments_url":"https://api.github.com/repos/phemonick/Book-A-Meal/deployments","created_at":"2018-04-16T12:04:33Z","updated_at":"2018-09-13T14:00:58Z","pushed_at":"2018-09-14T06:19:09Z","git_url":"git://github.com/phemonick/Book-A-Meal.git","ssh_url":"git@github.com:phemonick/Book-A-Meal.git","clone_url":"https://github.com/phemonick/Book-A-Meal.git","svn_url":"https://github.com/phemonick/Book-A-Meal","homepage":null,"size":18133,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":3,"watchers":0,"default_branch":"develop"}},"base":{"label":"phemonick:develop","ref":"develop","sha":"74c0182425fe33205b306d955634693c80603fea","user":{"login":"phemonick","id":23261181,"node_id":"MDQ6VXNlcjIzMjYxMTgx","avatar_url":"https://avatars2.githubusercontent.com/u/23261181?v=4","gravatar_id":"","url":"https://api.github.com/users/phemonick","html_url":"https://github.com/phemonick","followers_url":"https://api.github.com/users/phemonick/followers","following_url":"https://api.github.com/users/phemonick/following{/other_user}","gists_url":"https://api.github.com/users/phemonick/gists{/gist_id}","starred_url":"https://api.github.com/users/phemonick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phemonick/subscriptions","organizations_url":"https://api.github.com/users/phemonick/orgs","repos_url":"https://api.github.com/users/phemonick/repos","events_url":"https://api.github.com/users/phemonick/events{/privacy}","received_events_url":"https://api.github.com/users/phemonick/received_events","type":"User","site_admin":false},"repo":{"id":129736532,"node_id":"MDEwOlJlcG9zaXRvcnkxMjk3MzY1MzI=","name":"Book-A-Meal","full_name":"phemonick/Book-A-Meal","owner":{"login":"phemonick","id":23261181,"node_id":"MDQ6VXNlcjIzMjYxMTgx","avatar_url":"https://avatars2.githubusercontent.com/u/23261181?v=4","gravatar_id":"","url":"https://api.github.com/users/phemonick","html_url":"https://github.com/phemonick","followers_url":"https://api.github.com/users/phemonick/followers","following_url":"https://api.github.com/users/phemonick/following{/other_user}","gists_url":"https://api.github.com/users/phemonick/gists{/gist_id}","starred_url":"https://api.github.com/users/phemonick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phemonick/subscriptions","organizations_url":"https://api.github.com/users/phemonick/orgs","repos_url":"https://api.github.com/users/phemonick/repos","events_url":"https://api.github.com/users/phemonick/events{/privacy}","received_events_url":"https://api.github.com/users/phemonick/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phemonick/Book-A-Meal","description":"an application that allows customers to make food orders","fork":false,"url":"https://api.github.com/repos/phemonick/Book-A-Meal","forks_url":"https://api.github.com/repos/phemonick/Book-A-Meal/forks","keys_url":"https://api.github.com/repos/phemonick/Book-A-Meal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phemonick/Book-A-Meal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phemonick/Book-A-Meal/teams","hooks_url":"https://api.github.com/repos/phemonick/Book-A-Meal/hooks","issue_events_url":"https://api.github.com/repos/phemonick/Book-A-Meal/issues/events{/number}","events_url":"https://api.github.com/repos/phemonick/Book-A-Meal/events","assignees_url":"https://api.github.com/repos/phemonick/Book-A-Meal/assignees{/user}","branches_url":"https://api.github.com/repos/phemonick/Book-A-Meal/branches{/branch}","tags_url":"https://api.github.com/repos/phemonick/Book-A-Meal/tags","blobs_url":"https://api.github.com/repos/phemonick/Book-A-Meal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phemonick/Book-A-Meal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phemonick/Book-A-Meal/git/refs{/sha}","trees_url":"https://api.github.com/repos/phemonick/Book-A-Meal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phemonick/Book-A-Meal/statuses/{sha}","languages_url":"https://api.github.com/repos/phemonick/Book-A-Meal/languages","stargazers_url":"https://api.github.com/repos/phemonick/Book-A-Meal/stargazers","contributors_url":"https://api.github.com/repos/phemonick/Book-A-Meal/contributors","subscribers_url":"https://api.github.com/repos/phemonick/Book-A-Meal/subscribers","subscription_url":"https://api.github.com/repos/phemonick/Book-A-Meal/subscription","commits_url":"https://api.github.com/repos/phemonick/Book-A-Meal/commits{/sha}","git_commits_url":"https://api.github.com/repos/phemonick/Book-A-Meal/git/commits{/sha}","comments_url":"https://api.github.com/repos/phemonick/Book-A-Meal/comments{/number}","issue_comment_url":"https://api.github.com/repos/phemonick/Book-A-Meal/issues/comments{/number}","contents_url":"https://api.github.com/repos/phemonick/Book-A-Meal/contents/{+path}","compare_url":"https://api.github.com/repos/phemonick/Book-A-Meal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phemonick/Book-A-Meal/merges","archive_url":"https://api.github.com/repos/phemonick/Book-A-Meal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phemonick/Book-A-Meal/downloads","issues_url":"https://api.github.com/repos/phemonick/Book-A-Meal/issues{/number}","pulls_url":"https://api.github.com/repos/phemonick/Book-A-Meal/pulls{/number}","milestones_url":"https://api.github.com/repos/phemonick/Book-A-Meal/milestones{/number}","notifications_url":"https://api.github.com/repos/phemonick/Book-A-Meal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phemonick/Book-A-Meal/labels{/name}","releases_url":"https://api.github.com/repos/phemonick/Book-A-Meal/releases{/id}","deployments_url":"https://api.github.com/repos/phemonick/Book-A-Meal/deployments","created_at":"2018-04-16T12:04:33Z","updated_at":"2018-09-13T14:00:58Z","pushed_at":"2018-09-14T06:19:09Z","git_url":"git://github.com/phemonick/Book-A-Meal.git","ssh_url":"git@github.com:phemonick/Book-A-Meal.git","clone_url":"https://github.com/phemonick/Book-A-Meal.git","svn_url":"https://github.com/phemonick/Book-A-Meal","homepage":null,"size":18133,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":3,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/phemonick/Book-A-Meal/pulls/82"},"html":{"href":"https://github.com/phemonick/Book-A-Meal/pull/82"},"issue":{"href":"https://api.github.com/repos/phemonick/Book-A-Meal/issues/82"},"comments":{"href":"https://api.github.com/repos/phemonick/Book-A-Meal/issues/82/comments"},"review_comments":{"href":"https://api.github.com/repos/phemonick/Book-A-Meal/pulls/82/comments"},"review_comment":{"href":"https://api.github.com/repos/phemonick/Book-A-Meal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phemonick/Book-A-Meal/pulls/82/commits"},"statuses":{"href":"https://api.github.com/repos/phemonick/Book-A-Meal/statuses/8d8364905a693cb673c8f19a6ce9925d8e40d196"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}