{"action":"created","comment":{"url":"https://api.github.com/repos/otseobande/Book-A-Meal/pulls/comments/183583728","pull_request_review_id":114608680,"id":183583728,"diff_hunk":"@@ -0,0 +1,71 @@\n+import chai from 'chai';\n+import Controller from '../../controllers/controller';\n+import MealController from '../../controllers/mealController';\n+import { mockReq, mockRes } from 'sinon-express-mock';\n+import sinon from 'sinon';\n+import sinonChai from 'sinon-chai';\n+\n+chai.use(sinonChai);\n+chai.should();\n+\n+describe('Meal Controller', function(){\n+\tit('should be a function', function(){\n+\t\tMealController.should.be.a('function');\n+\t});\n+\tit('should extend base controller', function(){\n+\t\tconst mealController = new MealController();\n+\n+\t\tmealController.should.be.instanceOf(MealController);\n+\t\tmealController.should.be.instanceOf(Controller);\n+\t});\n+\n+\tconst request = {\n+\t\tbody: {\n+\t\t\ttitle: \"test meal\",\n+\t\t\tdescription: \"great meal\",\n+\t\t\tprice: 500,\n+\t\t\timg: \"image_link\"\n+\t\t}\n+\t}\n+\n+\tconst badRequest = {\n+\t\tbody: {\n+\t\t\ttitle: \"test meal\",\n+\t\t\tdescription: \"great meal\",\n+\t\t\timg: \"image_link\"\n+\t\t}\n+\t}\n+\n+\tconst req = mockReq(request);\n+    const res = mockRes();\n+\n+\tdescribe('create meal method', function() {\n+\t\tbeforeEach(function() {\n+\t\t\tMealController.createMeal(req,res);    \n+\t\t});\n+\n+\t\tit('should return 201 on success', function(){\n+\t\t\t res.status.should.have.been.calledWith(201);\n+\t\t});\n+\n+\t\tit('add a meal record successfully', function(){\n+\t\t    res.json.should.have.been.calledWith({message: \"Meal created successfully\"});\n+\t\t});\n+\n+\t\tit('should return error 400 if parameters are not fully given', function(){\n+\t\t\t\n+\t\t\tconst badReq = mockReq(badRequest);","path":"server/tests/controllers/testMealController.js","position":57,"original_position":57,"commit_id":"d80b062571393f2918298b0ab7bd8665427acf7d","original_commit_id":"d80b062571393f2918298b0ab7bd8665427acf7d","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":"'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).","created_at":"2018-04-24T01:38:34Z","updated_at":"2018-04-24T01:38:35Z","html_url":"https://github.com/otseobande/Book-A-Meal/pull/2#discussion_r183583728","pull_request_url":"https://api.github.com/repos/otseobande/Book-A-Meal/pulls/2","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/otseobande/Book-A-Meal/pulls/comments/183583728"},"html":{"href":"https://github.com/otseobande/Book-A-Meal/pull/2#discussion_r183583728"},"pull_request":{"href":"https://api.github.com/repos/otseobande/Book-A-Meal/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/otseobande/Book-A-Meal/pulls/2","id":183599279,"html_url":"https://github.com/otseobande/Book-A-Meal/pull/2","diff_url":"https://github.com/otseobande/Book-A-Meal/pull/2.diff","patch_url":"https://github.com/otseobande/Book-A-Meal/pull/2.patch","issue_url":"https://api.github.com/repos/otseobande/Book-A-Meal/issues/2","number":2,"state":"open","locked":false,"title":"156977446 ft create meal endpoint","user":{"login":"otseobande","id":17123317,"avatar_url":"https://avatars3.githubusercontent.com/u/17123317?v=4","gravatar_id":"","url":"https://api.github.com/users/otseobande","html_url":"https://github.com/otseobande","followers_url":"https://api.github.com/users/otseobande/followers","following_url":"https://api.github.com/users/otseobande/following{/other_user}","gists_url":"https://api.github.com/users/otseobande/gists{/gist_id}","starred_url":"https://api.github.com/users/otseobande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otseobande/subscriptions","organizations_url":"https://api.github.com/users/otseobande/orgs","repos_url":"https://api.github.com/users/otseobande/repos","events_url":"https://api.github.com/users/otseobande/events{/privacy}","received_events_url":"https://api.github.com/users/otseobande/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nThis Pull Requests adds a \"POST /api/v1/meals\" endpoint to the application to enable caterers create meals\r\n\r\n#### Description of Task to be completed?\r\nOther endpoints for meal management are to be created also.\r\n\r\n#### How should this be manually tested?\r\nUse postman to run tests on the api\r\n\r\n#### What are the relevant pivotal tracker stories?\r\n* #156977446\r\n\r\n","created_at":"2018-04-24T01:38:21Z","updated_at":"2018-04-24T01:38:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7ab8fc4772d7e75aff961ccc06bf71c0c00cd515","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/otseobande/Book-A-Meal/pulls/2/commits","review_comments_url":"https://api.github.com/repos/otseobande/Book-A-Meal/pulls/2/comments","review_comment_url":"https://api.github.com/repos/otseobande/Book-A-Meal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/otseobande/Book-A-Meal/issues/2/comments","statuses_url":"https://api.github.com/repos/otseobande/Book-A-Meal/statuses/d80b062571393f2918298b0ab7bd8665427acf7d","head":{"label":"otseobande:156977446-ft-create-meal-endpoint","ref":"156977446-ft-create-meal-endpoint","sha":"d80b062571393f2918298b0ab7bd8665427acf7d","user":{"login":"otseobande","id":17123317,"avatar_url":"https://avatars3.githubusercontent.com/u/17123317?v=4","gravatar_id":"","url":"https://api.github.com/users/otseobande","html_url":"https://github.com/otseobande","followers_url":"https://api.github.com/users/otseobande/followers","following_url":"https://api.github.com/users/otseobande/following{/other_user}","gists_url":"https://api.github.com/users/otseobande/gists{/gist_id}","starred_url":"https://api.github.com/users/otseobande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otseobande/subscriptions","organizations_url":"https://api.github.com/users/otseobande/orgs","repos_url":"https://api.github.com/users/otseobande/repos","events_url":"https://api.github.com/users/otseobande/events{/privacy}","received_events_url":"https://api.github.com/users/otseobande/received_events","type":"User","site_admin":false},"repo":{"id":129763088,"name":"Book-A-Meal","full_name":"otseobande/Book-A-Meal","owner":{"login":"otseobande","id":17123317,"avatar_url":"https://avatars3.githubusercontent.com/u/17123317?v=4","gravatar_id":"","url":"https://api.github.com/users/otseobande","html_url":"https://github.com/otseobande","followers_url":"https://api.github.com/users/otseobande/followers","following_url":"https://api.github.com/users/otseobande/following{/other_user}","gists_url":"https://api.github.com/users/otseobande/gists{/gist_id}","starred_url":"https://api.github.com/users/otseobande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otseobande/subscriptions","organizations_url":"https://api.github.com/users/otseobande/orgs","repos_url":"https://api.github.com/users/otseobande/repos","events_url":"https://api.github.com/users/otseobande/events{/privacy}","received_events_url":"https://api.github.com/users/otseobande/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/otseobande/Book-A-Meal","description":"Book-A-Meal is an application that allows customers to make food orders and helps the food vendor know what the customers want to eat.","fork":false,"url":"https://api.github.com/repos/otseobande/Book-A-Meal","forks_url":"https://api.github.com/repos/otseobande/Book-A-Meal/forks","keys_url":"https://api.github.com/repos/otseobande/Book-A-Meal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/otseobande/Book-A-Meal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/otseobande/Book-A-Meal/teams","hooks_url":"https://api.github.com/repos/otseobande/Book-A-Meal/hooks","issue_events_url":"https://api.github.com/repos/otseobande/Book-A-Meal/issues/events{/number}","events_url":"https://api.github.com/repos/otseobande/Book-A-Meal/events","assignees_url":"https://api.github.com/repos/otseobande/Book-A-Meal/assignees{/user}","branches_url":"https://api.github.com/repos/otseobande/Book-A-Meal/branches{/branch}","tags_url":"https://api.github.com/repos/otseobande/Book-A-Meal/tags","blobs_url":"https://api.github.com/repos/otseobande/Book-A-Meal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/otseobande/Book-A-Meal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/otseobande/Book-A-Meal/git/refs{/sha}","trees_url":"https://api.github.com/repos/otseobande/Book-A-Meal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/otseobande/Book-A-Meal/statuses/{sha}","languages_url":"https://api.github.com/repos/otseobande/Book-A-Meal/languages","stargazers_url":"https://api.github.com/repos/otseobande/Book-A-Meal/stargazers","contributors_url":"https://api.github.com/repos/otseobande/Book-A-Meal/contributors","subscribers_url":"https://api.github.com/repos/otseobande/Book-A-Meal/subscribers","subscription_url":"https://api.github.com/repos/otseobande/Book-A-Meal/subscription","commits_url":"https://api.github.com/repos/otseobande/Book-A-Meal/commits{/sha}","git_commits_url":"https://api.github.com/repos/otseobande/Book-A-Meal/git/commits{/sha}","comments_url":"https://api.github.com/repos/otseobande/Book-A-Meal/comments{/number}","issue_comment_url":"https://api.github.com/repos/otseobande/Book-A-Meal/issues/comments{/number}","contents_url":"https://api.github.com/repos/otseobande/Book-A-Meal/contents/{+path}","compare_url":"https://api.github.com/repos/otseobande/Book-A-Meal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/otseobande/Book-A-Meal/merges","archive_url":"https://api.github.com/repos/otseobande/Book-A-Meal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/otseobande/Book-A-Meal/downloads","issues_url":"https://api.github.com/repos/otseobande/Book-A-Meal/issues{/number}","pulls_url":"https://api.github.com/repos/otseobande/Book-A-Meal/pulls{/number}","milestones_url":"https://api.github.com/repos/otseobande/Book-A-Meal/milestones{/number}","notifications_url":"https://api.github.com/repos/otseobande/Book-A-Meal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/otseobande/Book-A-Meal/labels{/name}","releases_url":"https://api.github.com/repos/otseobande/Book-A-Meal/releases{/id}","deployments_url":"https://api.github.com/repos/otseobande/Book-A-Meal/deployments","created_at":"2018-04-16T15:13:38Z","updated_at":"2018-04-23T16:42:35Z","pushed_at":"2018-04-24T01:38:22Z","git_url":"git://github.com/otseobande/Book-A-Meal.git","ssh_url":"git@github.com:otseobande/Book-A-Meal.git","clone_url":"https://github.com/otseobande/Book-A-Meal.git","svn_url":"https://github.com/otseobande/Book-A-Meal","homepage":"https://otseobande.github.io/Book-A-Meal/","size":5161,"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":"develop"}},"base":{"label":"otseobande:develop","ref":"develop","sha":"ff08d64ad583ba42e3e9404d76bfc245ce8095f9","user":{"login":"otseobande","id":17123317,"avatar_url":"https://avatars3.githubusercontent.com/u/17123317?v=4","gravatar_id":"","url":"https://api.github.com/users/otseobande","html_url":"https://github.com/otseobande","followers_url":"https://api.github.com/users/otseobande/followers","following_url":"https://api.github.com/users/otseobande/following{/other_user}","gists_url":"https://api.github.com/users/otseobande/gists{/gist_id}","starred_url":"https://api.github.com/users/otseobande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otseobande/subscriptions","organizations_url":"https://api.github.com/users/otseobande/orgs","repos_url":"https://api.github.com/users/otseobande/repos","events_url":"https://api.github.com/users/otseobande/events{/privacy}","received_events_url":"https://api.github.com/users/otseobande/received_events","type":"User","site_admin":false},"repo":{"id":129763088,"name":"Book-A-Meal","full_name":"otseobande/Book-A-Meal","owner":{"login":"otseobande","id":17123317,"avatar_url":"https://avatars3.githubusercontent.com/u/17123317?v=4","gravatar_id":"","url":"https://api.github.com/users/otseobande","html_url":"https://github.com/otseobande","followers_url":"https://api.github.com/users/otseobande/followers","following_url":"https://api.github.com/users/otseobande/following{/other_user}","gists_url":"https://api.github.com/users/otseobande/gists{/gist_id}","starred_url":"https://api.github.com/users/otseobande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otseobande/subscriptions","organizations_url":"https://api.github.com/users/otseobande/orgs","repos_url":"https://api.github.com/users/otseobande/repos","events_url":"https://api.github.com/users/otseobande/events{/privacy}","received_events_url":"https://api.github.com/users/otseobande/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/otseobande/Book-A-Meal","description":"Book-A-Meal is an application that allows customers to make food orders and helps the food vendor know what the customers want to eat.","fork":false,"url":"https://api.github.com/repos/otseobande/Book-A-Meal","forks_url":"https://api.github.com/repos/otseobande/Book-A-Meal/forks","keys_url":"https://api.github.com/repos/otseobande/Book-A-Meal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/otseobande/Book-A-Meal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/otseobande/Book-A-Meal/teams","hooks_url":"https://api.github.com/repos/otseobande/Book-A-Meal/hooks","issue_events_url":"https://api.github.com/repos/otseobande/Book-A-Meal/issues/events{/number}","events_url":"https://api.github.com/repos/otseobande/Book-A-Meal/events","assignees_url":"https://api.github.com/repos/otseobande/Book-A-Meal/assignees{/user}","branches_url":"https://api.github.com/repos/otseobande/Book-A-Meal/branches{/branch}","tags_url":"https://api.github.com/repos/otseobande/Book-A-Meal/tags","blobs_url":"https://api.github.com/repos/otseobande/Book-A-Meal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/otseobande/Book-A-Meal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/otseobande/Book-A-Meal/git/refs{/sha}","trees_url":"https://api.github.com/repos/otseobande/Book-A-Meal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/otseobande/Book-A-Meal/statuses/{sha}","languages_url":"https://api.github.com/repos/otseobande/Book-A-Meal/languages","stargazers_url":"https://api.github.com/repos/otseobande/Book-A-Meal/stargazers","contributors_url":"https://api.github.com/repos/otseobande/Book-A-Meal/contributors","subscribers_url":"https://api.github.com/repos/otseobande/Book-A-Meal/subscribers","subscription_url":"https://api.github.com/repos/otseobande/Book-A-Meal/subscription","commits_url":"https://api.github.com/repos/otseobande/Book-A-Meal/commits{/sha}","git_commits_url":"https://api.github.com/repos/otseobande/Book-A-Meal/git/commits{/sha}","comments_url":"https://api.github.com/repos/otseobande/Book-A-Meal/comments{/number}","issue_comment_url":"https://api.github.com/repos/otseobande/Book-A-Meal/issues/comments{/number}","contents_url":"https://api.github.com/repos/otseobande/Book-A-Meal/contents/{+path}","compare_url":"https://api.github.com/repos/otseobande/Book-A-Meal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/otseobande/Book-A-Meal/merges","archive_url":"https://api.github.com/repos/otseobande/Book-A-Meal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/otseobande/Book-A-Meal/downloads","issues_url":"https://api.github.com/repos/otseobande/Book-A-Meal/issues{/number}","pulls_url":"https://api.github.com/repos/otseobande/Book-A-Meal/pulls{/number}","milestones_url":"https://api.github.com/repos/otseobande/Book-A-Meal/milestones{/number}","notifications_url":"https://api.github.com/repos/otseobande/Book-A-Meal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/otseobande/Book-A-Meal/labels{/name}","releases_url":"https://api.github.com/repos/otseobande/Book-A-Meal/releases{/id}","deployments_url":"https://api.github.com/repos/otseobande/Book-A-Meal/deployments","created_at":"2018-04-16T15:13:38Z","updated_at":"2018-04-23T16:42:35Z","pushed_at":"2018-04-24T01:38:22Z","git_url":"git://github.com/otseobande/Book-A-Meal.git","ssh_url":"git@github.com:otseobande/Book-A-Meal.git","clone_url":"https://github.com/otseobande/Book-A-Meal.git","svn_url":"https://github.com/otseobande/Book-A-Meal","homepage":"https://otseobande.github.io/Book-A-Meal/","size":5161,"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":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/otseobande/Book-A-Meal/pulls/2"},"html":{"href":"https://github.com/otseobande/Book-A-Meal/pull/2"},"issue":{"href":"https://api.github.com/repos/otseobande/Book-A-Meal/issues/2"},"comments":{"href":"https://api.github.com/repos/otseobande/Book-A-Meal/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/otseobande/Book-A-Meal/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/otseobande/Book-A-Meal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/otseobande/Book-A-Meal/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/otseobande/Book-A-Meal/statuses/d80b062571393f2918298b0ab7bd8665427acf7d"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}