{"action":"created","comment":{"url":"https://api.github.com/repos/Oyebola-O/my-diary/pulls/comments/205273305","pull_request_review_id":140513414,"id":205273305,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTI3MzMwNQ==","diff_hunk":"@@ -0,0 +1,88 @@\n+import chai from 'chai';\n+import { expect } from 'chai';\n+import app from '../server';\n+\n+chai.use(require('chai-http'));\n+\n+\n+// Simple test to check if mocha and travis were setup well\n+function ret() {\n+  return 1;\n+}\n+\n+describe('Mocha and Travis are working', () => {\n+  it('is a simple test that checks if moha and travis were setup properly', () => {\n+    expect(ret()).to.equal(1);\n+  });\n+});\n+\n+// POST an enrty\n+describe('Create an entry', () => {\n+  it('Should create an entry', () => chai.request(app)\n+    .post('/api/v1/entries')\n+    .send({ title: 'Title', text: 'Text' })\n+    .then((res) => {\n+      expect(res).to.have.status(200);","path":"test/test_ES6.js","position":25,"original_position":25,"commit_id":"82ba09e7c80231c7c025cd1535da1a32eb0a4959","original_commit_id":"82ba09e7c80231c7c025cd1535da1a32eb0a4959","user":{"login":"andela-ookoro","id":28437541,"node_id":"MDQ6VXNlcjI4NDM3NTQx","avatar_url":"https://avatars1.githubusercontent.com/u/28437541?v=4","gravatar_id":"","url":"https://api.github.com/users/andela-ookoro","html_url":"https://github.com/andela-ookoro","followers_url":"https://api.github.com/users/andela-ookoro/followers","following_url":"https://api.github.com/users/andela-ookoro/following{/other_user}","gists_url":"https://api.github.com/users/andela-ookoro/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-ookoro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-ookoro/subscriptions","organizations_url":"https://api.github.com/users/andela-ookoro/orgs","repos_url":"https://api.github.com/users/andela-ookoro/repos","events_url":"https://api.github.com/users/andela-ookoro/events{/privacy}","received_events_url":"https://api.github.com/users/andela-ookoro/received_events","type":"User","site_admin":false},"body":"These test cases are not descriptive, refer to this https://medium.com/@yahelyechieli/5-tips-for-writing-great-javascript-unit-tests-86296ad2d997 for guideline","created_at":"2018-07-25T21:49:21Z","updated_at":"2018-07-25T21:49:21Z","html_url":"https://github.com/Oyebola-O/my-diary/pull/6#discussion_r205273305","pull_request_url":"https://api.github.com/repos/Oyebola-O/my-diary/pulls/6","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Oyebola-O/my-diary/pulls/comments/205273305"},"html":{"href":"https://github.com/Oyebola-O/my-diary/pull/6#discussion_r205273305"},"pull_request":{"href":"https://api.github.com/repos/Oyebola-O/my-diary/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/Oyebola-O/my-diary/pulls/6","id":203695862,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNjk1ODYy","html_url":"https://github.com/Oyebola-O/my-diary/pull/6","diff_url":"https://github.com/Oyebola-O/my-diary/pull/6.diff","patch_url":"https://github.com/Oyebola-O/my-diary/pull/6.patch","issue_url":"https://api.github.com/repos/Oyebola-O/my-diary/issues/6","number":6,"state":"open","locked":false,"title":"Merge api_v1 to master","user":{"login":"Oyebola-O","id":31081870,"node_id":"MDQ6VXNlcjMxMDgxODcw","avatar_url":"https://avatars1.githubusercontent.com/u/31081870?v=4","gravatar_id":"","url":"https://api.github.com/users/Oyebola-O","html_url":"https://github.com/Oyebola-O","followers_url":"https://api.github.com/users/Oyebola-O/followers","following_url":"https://api.github.com/users/Oyebola-O/following{/other_user}","gists_url":"https://api.github.com/users/Oyebola-O/gists{/gist_id}","starred_url":"https://api.github.com/users/Oyebola-O/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Oyebola-O/subscriptions","organizations_url":"https://api.github.com/users/Oyebola-O/orgs","repos_url":"https://api.github.com/users/Oyebola-O/repos","events_url":"https://api.github.com/users/Oyebola-O/events{/privacy}","received_events_url":"https://api.github.com/users/Oyebola-O/received_events","type":"User","site_admin":false},"body":"### [WIP]\r\n\r\nThe purpose of this pull request is to add API implementation of the following endpoints to the master:\r\n\r\nGET /entries which Fetches all entries\r\nGET /entries/<entryId> which Fetches a single entry\r\nPOST /entries which Creates an entry\r\nPUT /e​ntries​/<e​ntryId​> which Edits an entry\r\n\r\nThere's more information about these in the readme file. Each endpoint has tests to check if it's implementation is valid.\r\n\r\nThe request also contains files which make the app compatible to run on Heroku.\r\n\r\nAny feedback on the code from anyone would be helpful.\r\n\r\n@andela-ookoro please check my request to see if it is fit to be merged to the master.\r\n","created_at":"2018-07-25T01:18:03Z","updated_at":"2018-07-25T21:49:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b98bf344f6923a3390b68055148bd38dec49d55","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Oyebola-O/my-diary/pulls/6/commits","review_comments_url":"https://api.github.com/repos/Oyebola-O/my-diary/pulls/6/comments","review_comment_url":"https://api.github.com/repos/Oyebola-O/my-diary/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Oyebola-O/my-diary/issues/6/comments","statuses_url":"https://api.github.com/repos/Oyebola-O/my-diary/statuses/82ba09e7c80231c7c025cd1535da1a32eb0a4959","head":{"label":"Oyebola-O:api_v1","ref":"api_v1","sha":"82ba09e7c80231c7c025cd1535da1a32eb0a4959","user":{"login":"Oyebola-O","id":31081870,"node_id":"MDQ6VXNlcjMxMDgxODcw","avatar_url":"https://avatars1.githubusercontent.com/u/31081870?v=4","gravatar_id":"","url":"https://api.github.com/users/Oyebola-O","html_url":"https://github.com/Oyebola-O","followers_url":"https://api.github.com/users/Oyebola-O/followers","following_url":"https://api.github.com/users/Oyebola-O/following{/other_user}","gists_url":"https://api.github.com/users/Oyebola-O/gists{/gist_id}","starred_url":"https://api.github.com/users/Oyebola-O/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Oyebola-O/subscriptions","organizations_url":"https://api.github.com/users/Oyebola-O/orgs","repos_url":"https://api.github.com/users/Oyebola-O/repos","events_url":"https://api.github.com/users/Oyebola-O/events{/privacy}","received_events_url":"https://api.github.com/users/Oyebola-O/received_events","type":"User","site_admin":false},"repo":{"id":141840347,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE4NDAzNDc=","name":"my-diary","full_name":"Oyebola-O/my-diary","owner":{"login":"Oyebola-O","id":31081870,"node_id":"MDQ6VXNlcjMxMDgxODcw","avatar_url":"https://avatars1.githubusercontent.com/u/31081870?v=4","gravatar_id":"","url":"https://api.github.com/users/Oyebola-O","html_url":"https://github.com/Oyebola-O","followers_url":"https://api.github.com/users/Oyebola-O/followers","following_url":"https://api.github.com/users/Oyebola-O/following{/other_user}","gists_url":"https://api.github.com/users/Oyebola-O/gists{/gist_id}","starred_url":"https://api.github.com/users/Oyebola-O/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Oyebola-O/subscriptions","organizations_url":"https://api.github.com/users/Oyebola-O/orgs","repos_url":"https://api.github.com/users/Oyebola-O/repos","events_url":"https://api.github.com/users/Oyebola-O/events{/privacy}","received_events_url":"https://api.github.com/users/Oyebola-O/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Oyebola-O/my-diary","description":"MyDiary is an online journal where users can pen down their thoughts and feelings.","fork":false,"url":"https://api.github.com/repos/Oyebola-O/my-diary","forks_url":"https://api.github.com/repos/Oyebola-O/my-diary/forks","keys_url":"https://api.github.com/repos/Oyebola-O/my-diary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Oyebola-O/my-diary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Oyebola-O/my-diary/teams","hooks_url":"https://api.github.com/repos/Oyebola-O/my-diary/hooks","issue_events_url":"https://api.github.com/repos/Oyebola-O/my-diary/issues/events{/number}","events_url":"https://api.github.com/repos/Oyebola-O/my-diary/events","assignees_url":"https://api.github.com/repos/Oyebola-O/my-diary/assignees{/user}","branches_url":"https://api.github.com/repos/Oyebola-O/my-diary/branches{/branch}","tags_url":"https://api.github.com/repos/Oyebola-O/my-diary/tags","blobs_url":"https://api.github.com/repos/Oyebola-O/my-diary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Oyebola-O/my-diary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Oyebola-O/my-diary/git/refs{/sha}","trees_url":"https://api.github.com/repos/Oyebola-O/my-diary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Oyebola-O/my-diary/statuses/{sha}","languages_url":"https://api.github.com/repos/Oyebola-O/my-diary/languages","stargazers_url":"https://api.github.com/repos/Oyebola-O/my-diary/stargazers","contributors_url":"https://api.github.com/repos/Oyebola-O/my-diary/contributors","subscribers_url":"https://api.github.com/repos/Oyebola-O/my-diary/subscribers","subscription_url":"https://api.github.com/repos/Oyebola-O/my-diary/subscription","commits_url":"https://api.github.com/repos/Oyebola-O/my-diary/commits{/sha}","git_commits_url":"https://api.github.com/repos/Oyebola-O/my-diary/git/commits{/sha}","comments_url":"https://api.github.com/repos/Oyebola-O/my-diary/comments{/number}","issue_comment_url":"https://api.github.com/repos/Oyebola-O/my-diary/issues/comments{/number}","contents_url":"https://api.github.com/repos/Oyebola-O/my-diary/contents/{+path}","compare_url":"https://api.github.com/repos/Oyebola-O/my-diary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Oyebola-O/my-diary/merges","archive_url":"https://api.github.com/repos/Oyebola-O/my-diary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Oyebola-O/my-diary/downloads","issues_url":"https://api.github.com/repos/Oyebola-O/my-diary/issues{/number}","pulls_url":"https://api.github.com/repos/Oyebola-O/my-diary/pulls{/number}","milestones_url":"https://api.github.com/repos/Oyebola-O/my-diary/milestones{/number}","notifications_url":"https://api.github.com/repos/Oyebola-O/my-diary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Oyebola-O/my-diary/labels{/name}","releases_url":"https://api.github.com/repos/Oyebola-O/my-diary/releases{/id}","deployments_url":"https://api.github.com/repos/Oyebola-O/my-diary/deployments","created_at":"2018-07-21T19:25:33Z","updated_at":"2018-07-25T02:28:37Z","pushed_at":"2018-07-25T02:28:36Z","git_url":"git://github.com/Oyebola-O/my-diary.git","ssh_url":"git@github.com:Oyebola-O/my-diary.git","clone_url":"https://github.com/Oyebola-O/my-diary.git","svn_url":"https://github.com/Oyebola-O/my-diary","homepage":null,"size":401,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"api_v1"}},"base":{"label":"Oyebola-O:master","ref":"master","sha":"a6681ed1916065038f8c30e908ea0f6350cd25bc","user":{"login":"Oyebola-O","id":31081870,"node_id":"MDQ6VXNlcjMxMDgxODcw","avatar_url":"https://avatars1.githubusercontent.com/u/31081870?v=4","gravatar_id":"","url":"https://api.github.com/users/Oyebola-O","html_url":"https://github.com/Oyebola-O","followers_url":"https://api.github.com/users/Oyebola-O/followers","following_url":"https://api.github.com/users/Oyebola-O/following{/other_user}","gists_url":"https://api.github.com/users/Oyebola-O/gists{/gist_id}","starred_url":"https://api.github.com/users/Oyebola-O/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Oyebola-O/subscriptions","organizations_url":"https://api.github.com/users/Oyebola-O/orgs","repos_url":"https://api.github.com/users/Oyebola-O/repos","events_url":"https://api.github.com/users/Oyebola-O/events{/privacy}","received_events_url":"https://api.github.com/users/Oyebola-O/received_events","type":"User","site_admin":false},"repo":{"id":141840347,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE4NDAzNDc=","name":"my-diary","full_name":"Oyebola-O/my-diary","owner":{"login":"Oyebola-O","id":31081870,"node_id":"MDQ6VXNlcjMxMDgxODcw","avatar_url":"https://avatars1.githubusercontent.com/u/31081870?v=4","gravatar_id":"","url":"https://api.github.com/users/Oyebola-O","html_url":"https://github.com/Oyebola-O","followers_url":"https://api.github.com/users/Oyebola-O/followers","following_url":"https://api.github.com/users/Oyebola-O/following{/other_user}","gists_url":"https://api.github.com/users/Oyebola-O/gists{/gist_id}","starred_url":"https://api.github.com/users/Oyebola-O/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Oyebola-O/subscriptions","organizations_url":"https://api.github.com/users/Oyebola-O/orgs","repos_url":"https://api.github.com/users/Oyebola-O/repos","events_url":"https://api.github.com/users/Oyebola-O/events{/privacy}","received_events_url":"https://api.github.com/users/Oyebola-O/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Oyebola-O/my-diary","description":"MyDiary is an online journal where users can pen down their thoughts and feelings.","fork":false,"url":"https://api.github.com/repos/Oyebola-O/my-diary","forks_url":"https://api.github.com/repos/Oyebola-O/my-diary/forks","keys_url":"https://api.github.com/repos/Oyebola-O/my-diary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Oyebola-O/my-diary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Oyebola-O/my-diary/teams","hooks_url":"https://api.github.com/repos/Oyebola-O/my-diary/hooks","issue_events_url":"https://api.github.com/repos/Oyebola-O/my-diary/issues/events{/number}","events_url":"https://api.github.com/repos/Oyebola-O/my-diary/events","assignees_url":"https://api.github.com/repos/Oyebola-O/my-diary/assignees{/user}","branches_url":"https://api.github.com/repos/Oyebola-O/my-diary/branches{/branch}","tags_url":"https://api.github.com/repos/Oyebola-O/my-diary/tags","blobs_url":"https://api.github.com/repos/Oyebola-O/my-diary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Oyebola-O/my-diary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Oyebola-O/my-diary/git/refs{/sha}","trees_url":"https://api.github.com/repos/Oyebola-O/my-diary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Oyebola-O/my-diary/statuses/{sha}","languages_url":"https://api.github.com/repos/Oyebola-O/my-diary/languages","stargazers_url":"https://api.github.com/repos/Oyebola-O/my-diary/stargazers","contributors_url":"https://api.github.com/repos/Oyebola-O/my-diary/contributors","subscribers_url":"https://api.github.com/repos/Oyebola-O/my-diary/subscribers","subscription_url":"https://api.github.com/repos/Oyebola-O/my-diary/subscription","commits_url":"https://api.github.com/repos/Oyebola-O/my-diary/commits{/sha}","git_commits_url":"https://api.github.com/repos/Oyebola-O/my-diary/git/commits{/sha}","comments_url":"https://api.github.com/repos/Oyebola-O/my-diary/comments{/number}","issue_comment_url":"https://api.github.com/repos/Oyebola-O/my-diary/issues/comments{/number}","contents_url":"https://api.github.com/repos/Oyebola-O/my-diary/contents/{+path}","compare_url":"https://api.github.com/repos/Oyebola-O/my-diary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Oyebola-O/my-diary/merges","archive_url":"https://api.github.com/repos/Oyebola-O/my-diary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Oyebola-O/my-diary/downloads","issues_url":"https://api.github.com/repos/Oyebola-O/my-diary/issues{/number}","pulls_url":"https://api.github.com/repos/Oyebola-O/my-diary/pulls{/number}","milestones_url":"https://api.github.com/repos/Oyebola-O/my-diary/milestones{/number}","notifications_url":"https://api.github.com/repos/Oyebola-O/my-diary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Oyebola-O/my-diary/labels{/name}","releases_url":"https://api.github.com/repos/Oyebola-O/my-diary/releases{/id}","deployments_url":"https://api.github.com/repos/Oyebola-O/my-diary/deployments","created_at":"2018-07-21T19:25:33Z","updated_at":"2018-07-25T02:28:37Z","pushed_at":"2018-07-25T02:28:36Z","git_url":"git://github.com/Oyebola-O/my-diary.git","ssh_url":"git@github.com:Oyebola-O/my-diary.git","clone_url":"https://github.com/Oyebola-O/my-diary.git","svn_url":"https://github.com/Oyebola-O/my-diary","homepage":null,"size":401,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"api_v1"}},"_links":{"self":{"href":"https://api.github.com/repos/Oyebola-O/my-diary/pulls/6"},"html":{"href":"https://github.com/Oyebola-O/my-diary/pull/6"},"issue":{"href":"https://api.github.com/repos/Oyebola-O/my-diary/issues/6"},"comments":{"href":"https://api.github.com/repos/Oyebola-O/my-diary/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/Oyebola-O/my-diary/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/Oyebola-O/my-diary/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Oyebola-O/my-diary/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/Oyebola-O/my-diary/statuses/82ba09e7c80231c7c025cd1535da1a32eb0a4959"}},"author_association":"OWNER"}}
{"actor":{"display_login":"andela-ookoro"}}