{"action":"created","comment":{"url":"https://api.github.com/repos/rovilay/Book-A-Meal/pulls/comments/184725973","pull_request_review_id":115985226,"id":184725973,"diff_hunk":"@@ -152,56 +152,88 @@ it('should return a list of all meals with new meal', (done) => {\n });\n });\n \n-// describe('GET /api/v1/meals/:id', () => {\n-\n-//   it('should return status code 200', (done) => {\n-\n-//     chai.request(app.listen())\n-//       .get('/api/v1/meals/1')\n-//       .end((err, res) => {\n-//         // console.log(res);\n-//         res.status.should.equal(200);\n-//         expect('content-type', /json/);\n-//         res.body.should.have.property('success');\n-//         res.body.should.have.property('message');\n-//         res.body.should.have.property('meal');\n-//         res.body.meal.should.be.an('object');\n-//         res.body.meal.should.not.be.an('array');\n-//         done();\n-//       });\n-//   });\n-//   it('Meal returned should have right properties if id exist', (done) => {\n-//     chai.request(app.listen())\n-//       .get('/api/v1/meals/1')\n-//       .end((err, res) => {\n-//         console.log(res.meal);\n-//           res.body.meal.should.be.an('object');\n-//           res.body.meal.should.have.property('id');\n-//           res.body.meal.should.have.property('title');\n-//           res.body.meal.should.have.property('description');\n-//           res.body.meal.should.have.property('price');\n-//           res.body.meal.should.have.property('img');\n-//           res.body.meal.id.should.be.a('number');\n-//           res.body.meal.title.should.be.a('string');\n-//           res.body.meal.description.should.be.a('string');\n-//           parseInt(res.body.meal.price).should.be.a('number');\n-//           if(res.body.meal.img !== null) {\n-//             res.body.meal.img.should.be.a('string');\n-//           }\n-\n-//         done();\n-//       });\n-//   });\n-//   it('should return 404 if id do not exist', (done) => {\n-//     chai.request(app.listen())\n-//       .get('/api/v1/meals/15')\n-//       .end((err, res) => {\n-//         res.status.should.equal(404);\n-\n-//         done();\n-//       });\n-//   });\n-\n-// });\n-\n-// });\n\\ No newline at end of file\n+describe('PUT /api/v1/meals/:id', () => {\n+  it('should return status code 404', (done) => {\n+    chai.request(app.listen())\n+      .put('/api/v1/meals')\n+      .send({\n+        title: 'Rice and Chicken',\n+        description: 'Very Good',\n+        price: 700,\n+        image: 'hp.image.com'\n+      })\n+      .end((err, res) => {\n+        res.status.should.equal(404);\n+      });\n+    done();\n+  });\n+\n+  it('should return status code 404', (done) => {\n+    chai.request(app.listen())\n+      .put('/api/v1/meals/2')\n+      .send({\n+        title: 'Rice and Chicken',\n+        price: 700,\n+        image: 'hp.image.com'\n+      })\n+      .end((err, res) => {\n+        res.status.should.equal(404);\n+        expect('content/type', /json/);\n+        res.body.message.should.equal('description is required!');\n+      });\n+    done();\n+  });\n+\n+  it('should update specified id meal', (done) => {\n+    chai.request(app.listen())\n+      .put('/api/v1/meals/2')\n+      .send({\n+        title: 'Rice and Chicken',\n+        description: 'So delicious',\n+        price: 700,\n+        image: 'hp.image.com'\n+      })\n+      .end((err, res) => {\n+        res.status.should.equal(201);\n+        expect('content/type', /json/);\n+        res.body.should.be.an('object');\n+        res.body.message.should.equal('Meal updated successfully!');\n+        res.body.meals.should.be.an('array');\n+        res.body.meals[2].title.should.equal('Rice and Chicken');\n+      });\n+    done();\n+  });\n+});\n+\n+describe('DELETE /api/v1/meals/:id', () => {","path":"test/mealstest.js","position":111,"original_position":111,"commit_id":"4e3c2e25623e9dffbae7a832622929540f5272a9","original_commit_id":"4e3c2e25623e9dffbae7a832622929540f5272a9","user":{"login":"houndci-bot","id":6697940,"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":"'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').","created_at":"2018-04-27T15:38:52Z","updated_at":"2018-04-27T15:38:54Z","html_url":"https://github.com/rovilay/Book-A-Meal/pull/7#discussion_r184725973","pull_request_url":"https://api.github.com/repos/rovilay/Book-A-Meal/pulls/7","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/rovilay/Book-A-Meal/pulls/comments/184725973"},"html":{"href":"https://github.com/rovilay/Book-A-Meal/pull/7#discussion_r184725973"},"pull_request":{"href":"https://api.github.com/repos/rovilay/Book-A-Meal/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/rovilay/Book-A-Meal/pulls/7","id":184657808,"html_url":"https://github.com/rovilay/Book-A-Meal/pull/7","diff_url":"https://github.com/rovilay/Book-A-Meal/pull/7.diff","patch_url":"https://github.com/rovilay/Book-A-Meal/pull/7.patch","issue_url":"https://api.github.com/repos/rovilay/Book-A-Meal/issues/7","number":7,"state":"open","locked":false,"title":"#157108821 feature delete meal","user":{"login":"rovilay","id":27569442,"avatar_url":"https://avatars0.githubusercontent.com/u/27569442?v=4","gravatar_id":"","url":"https://api.github.com/users/rovilay","html_url":"https://github.com/rovilay","followers_url":"https://api.github.com/users/rovilay/followers","following_url":"https://api.github.com/users/rovilay/following{/other_user}","gists_url":"https://api.github.com/users/rovilay/gists{/gist_id}","starred_url":"https://api.github.com/users/rovilay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rovilay/subscriptions","organizations_url":"https://api.github.com/users/rovilay/orgs","repos_url":"https://api.github.com/users/rovilay/repos","events_url":"https://api.github.com/users/rovilay/events{/privacy}","received_events_url":"https://api.github.com/users/rovilay/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-27T15:38:41Z","updated_at":"2018-04-27T15:38:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"854b46d271ac6c1fd61a33f9dc3a40cf2231ee81","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rovilay/Book-A-Meal/pulls/7/commits","review_comments_url":"https://api.github.com/repos/rovilay/Book-A-Meal/pulls/7/comments","review_comment_url":"https://api.github.com/repos/rovilay/Book-A-Meal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rovilay/Book-A-Meal/issues/7/comments","statuses_url":"https://api.github.com/repos/rovilay/Book-A-Meal/statuses/4e3c2e25623e9dffbae7a832622929540f5272a9","head":{"label":"rovilay:#157108821-feature-delete-meal","ref":"#157108821-feature-delete-meal","sha":"4e3c2e25623e9dffbae7a832622929540f5272a9","user":{"login":"rovilay","id":27569442,"avatar_url":"https://avatars0.githubusercontent.com/u/27569442?v=4","gravatar_id":"","url":"https://api.github.com/users/rovilay","html_url":"https://github.com/rovilay","followers_url":"https://api.github.com/users/rovilay/followers","following_url":"https://api.github.com/users/rovilay/following{/other_user}","gists_url":"https://api.github.com/users/rovilay/gists{/gist_id}","starred_url":"https://api.github.com/users/rovilay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rovilay/subscriptions","organizations_url":"https://api.github.com/users/rovilay/orgs","repos_url":"https://api.github.com/users/rovilay/repos","events_url":"https://api.github.com/users/rovilay/events{/privacy}","received_events_url":"https://api.github.com/users/rovilay/received_events","type":"User","site_admin":false},"repo":{"id":129815029,"name":"Book-A-Meal","full_name":"rovilay/Book-A-Meal","owner":{"login":"rovilay","id":27569442,"avatar_url":"https://avatars0.githubusercontent.com/u/27569442?v=4","gravatar_id":"","url":"https://api.github.com/users/rovilay","html_url":"https://github.com/rovilay","followers_url":"https://api.github.com/users/rovilay/followers","following_url":"https://api.github.com/users/rovilay/following{/other_user}","gists_url":"https://api.github.com/users/rovilay/gists{/gist_id}","starred_url":"https://api.github.com/users/rovilay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rovilay/subscriptions","organizations_url":"https://api.github.com/users/rovilay/orgs","repos_url":"https://api.github.com/users/rovilay/repos","events_url":"https://api.github.com/users/rovilay/events{/privacy}","received_events_url":"https://api.github.com/users/rovilay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rovilay/Book-A-Meal","description":"This app is a bootcamp project","fork":false,"url":"https://api.github.com/repos/rovilay/Book-A-Meal","forks_url":"https://api.github.com/repos/rovilay/Book-A-Meal/forks","keys_url":"https://api.github.com/repos/rovilay/Book-A-Meal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rovilay/Book-A-Meal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rovilay/Book-A-Meal/teams","hooks_url":"https://api.github.com/repos/rovilay/Book-A-Meal/hooks","issue_events_url":"https://api.github.com/repos/rovilay/Book-A-Meal/issues/events{/number}","events_url":"https://api.github.com/repos/rovilay/Book-A-Meal/events","assignees_url":"https://api.github.com/repos/rovilay/Book-A-Meal/assignees{/user}","branches_url":"https://api.github.com/repos/rovilay/Book-A-Meal/branches{/branch}","tags_url":"https://api.github.com/repos/rovilay/Book-A-Meal/tags","blobs_url":"https://api.github.com/repos/rovilay/Book-A-Meal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rovilay/Book-A-Meal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rovilay/Book-A-Meal/git/refs{/sha}","trees_url":"https://api.github.com/repos/rovilay/Book-A-Meal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rovilay/Book-A-Meal/statuses/{sha}","languages_url":"https://api.github.com/repos/rovilay/Book-A-Meal/languages","stargazers_url":"https://api.github.com/repos/rovilay/Book-A-Meal/stargazers","contributors_url":"https://api.github.com/repos/rovilay/Book-A-Meal/contributors","subscribers_url":"https://api.github.com/repos/rovilay/Book-A-Meal/subscribers","subscription_url":"https://api.github.com/repos/rovilay/Book-A-Meal/subscription","commits_url":"https://api.github.com/repos/rovilay/Book-A-Meal/commits{/sha}","git_commits_url":"https://api.github.com/repos/rovilay/Book-A-Meal/git/commits{/sha}","comments_url":"https://api.github.com/repos/rovilay/Book-A-Meal/comments{/number}","issue_comment_url":"https://api.github.com/repos/rovilay/Book-A-Meal/issues/comments{/number}","contents_url":"https://api.github.com/repos/rovilay/Book-A-Meal/contents/{+path}","compare_url":"https://api.github.com/repos/rovilay/Book-A-Meal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rovilay/Book-A-Meal/merges","archive_url":"https://api.github.com/repos/rovilay/Book-A-Meal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rovilay/Book-A-Meal/downloads","issues_url":"https://api.github.com/repos/rovilay/Book-A-Meal/issues{/number}","pulls_url":"https://api.github.com/repos/rovilay/Book-A-Meal/pulls{/number}","milestones_url":"https://api.github.com/repos/rovilay/Book-A-Meal/milestones{/number}","notifications_url":"https://api.github.com/repos/rovilay/Book-A-Meal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rovilay/Book-A-Meal/labels{/name}","releases_url":"https://api.github.com/repos/rovilay/Book-A-Meal/releases{/id}","deployments_url":"https://api.github.com/repos/rovilay/Book-A-Meal/deployments","created_at":"2018-04-16T22:47:31Z","updated_at":"2018-04-27T15:37:49Z","pushed_at":"2018-04-27T15:38:42Z","git_url":"git://github.com/rovilay/Book-A-Meal.git","ssh_url":"git@github.com:rovilay/Book-A-Meal.git","clone_url":"https://github.com/rovilay/Book-A-Meal.git","svn_url":"https://github.com/rovilay/Book-A-Meal","homepage":null,"size":516,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"rovilay:develop","ref":"develop","sha":"7ba2f5244a456bd4bd695c8a9b37be339ce96c8d","user":{"login":"rovilay","id":27569442,"avatar_url":"https://avatars0.githubusercontent.com/u/27569442?v=4","gravatar_id":"","url":"https://api.github.com/users/rovilay","html_url":"https://github.com/rovilay","followers_url":"https://api.github.com/users/rovilay/followers","following_url":"https://api.github.com/users/rovilay/following{/other_user}","gists_url":"https://api.github.com/users/rovilay/gists{/gist_id}","starred_url":"https://api.github.com/users/rovilay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rovilay/subscriptions","organizations_url":"https://api.github.com/users/rovilay/orgs","repos_url":"https://api.github.com/users/rovilay/repos","events_url":"https://api.github.com/users/rovilay/events{/privacy}","received_events_url":"https://api.github.com/users/rovilay/received_events","type":"User","site_admin":false},"repo":{"id":129815029,"name":"Book-A-Meal","full_name":"rovilay/Book-A-Meal","owner":{"login":"rovilay","id":27569442,"avatar_url":"https://avatars0.githubusercontent.com/u/27569442?v=4","gravatar_id":"","url":"https://api.github.com/users/rovilay","html_url":"https://github.com/rovilay","followers_url":"https://api.github.com/users/rovilay/followers","following_url":"https://api.github.com/users/rovilay/following{/other_user}","gists_url":"https://api.github.com/users/rovilay/gists{/gist_id}","starred_url":"https://api.github.com/users/rovilay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rovilay/subscriptions","organizations_url":"https://api.github.com/users/rovilay/orgs","repos_url":"https://api.github.com/users/rovilay/repos","events_url":"https://api.github.com/users/rovilay/events{/privacy}","received_events_url":"https://api.github.com/users/rovilay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rovilay/Book-A-Meal","description":"This app is a bootcamp project","fork":false,"url":"https://api.github.com/repos/rovilay/Book-A-Meal","forks_url":"https://api.github.com/repos/rovilay/Book-A-Meal/forks","keys_url":"https://api.github.com/repos/rovilay/Book-A-Meal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rovilay/Book-A-Meal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rovilay/Book-A-Meal/teams","hooks_url":"https://api.github.com/repos/rovilay/Book-A-Meal/hooks","issue_events_url":"https://api.github.com/repos/rovilay/Book-A-Meal/issues/events{/number}","events_url":"https://api.github.com/repos/rovilay/Book-A-Meal/events","assignees_url":"https://api.github.com/repos/rovilay/Book-A-Meal/assignees{/user}","branches_url":"https://api.github.com/repos/rovilay/Book-A-Meal/branches{/branch}","tags_url":"https://api.github.com/repos/rovilay/Book-A-Meal/tags","blobs_url":"https://api.github.com/repos/rovilay/Book-A-Meal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rovilay/Book-A-Meal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rovilay/Book-A-Meal/git/refs{/sha}","trees_url":"https://api.github.com/repos/rovilay/Book-A-Meal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rovilay/Book-A-Meal/statuses/{sha}","languages_url":"https://api.github.com/repos/rovilay/Book-A-Meal/languages","stargazers_url":"https://api.github.com/repos/rovilay/Book-A-Meal/stargazers","contributors_url":"https://api.github.com/repos/rovilay/Book-A-Meal/contributors","subscribers_url":"https://api.github.com/repos/rovilay/Book-A-Meal/subscribers","subscription_url":"https://api.github.com/repos/rovilay/Book-A-Meal/subscription","commits_url":"https://api.github.com/repos/rovilay/Book-A-Meal/commits{/sha}","git_commits_url":"https://api.github.com/repos/rovilay/Book-A-Meal/git/commits{/sha}","comments_url":"https://api.github.com/repos/rovilay/Book-A-Meal/comments{/number}","issue_comment_url":"https://api.github.com/repos/rovilay/Book-A-Meal/issues/comments{/number}","contents_url":"https://api.github.com/repos/rovilay/Book-A-Meal/contents/{+path}","compare_url":"https://api.github.com/repos/rovilay/Book-A-Meal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rovilay/Book-A-Meal/merges","archive_url":"https://api.github.com/repos/rovilay/Book-A-Meal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rovilay/Book-A-Meal/downloads","issues_url":"https://api.github.com/repos/rovilay/Book-A-Meal/issues{/number}","pulls_url":"https://api.github.com/repos/rovilay/Book-A-Meal/pulls{/number}","milestones_url":"https://api.github.com/repos/rovilay/Book-A-Meal/milestones{/number}","notifications_url":"https://api.github.com/repos/rovilay/Book-A-Meal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rovilay/Book-A-Meal/labels{/name}","releases_url":"https://api.github.com/repos/rovilay/Book-A-Meal/releases{/id}","deployments_url":"https://api.github.com/repos/rovilay/Book-A-Meal/deployments","created_at":"2018-04-16T22:47:31Z","updated_at":"2018-04-27T15:37:49Z","pushed_at":"2018-04-27T15:38:42Z","git_url":"git://github.com/rovilay/Book-A-Meal.git","ssh_url":"git@github.com:rovilay/Book-A-Meal.git","clone_url":"https://github.com/rovilay/Book-A-Meal.git","svn_url":"https://github.com/rovilay/Book-A-Meal","homepage":null,"size":516,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rovilay/Book-A-Meal/pulls/7"},"html":{"href":"https://github.com/rovilay/Book-A-Meal/pull/7"},"issue":{"href":"https://api.github.com/repos/rovilay/Book-A-Meal/issues/7"},"comments":{"href":"https://api.github.com/repos/rovilay/Book-A-Meal/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/rovilay/Book-A-Meal/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/rovilay/Book-A-Meal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rovilay/Book-A-Meal/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/rovilay/Book-A-Meal/statuses/4e3c2e25623e9dffbae7a832622929540f5272a9"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}