{"action":"created","comment":{"url":"https://api.github.com/repos/andela/k2-cfh/pulls/comments/154537148","pull_request_review_id":80713856,"id":154537148,"diff_hunk":"@@ -0,0 +1,112 @@\n+var chai = require('chai'),\n+  chaiHttp = require('chai-http'),\n+  mongoose = require('mongoose'),\n+  User = mongoose.model('User');\n+\n+var server = require('../../server');","path":"test/user/user.js","position":6,"original_position":6,"commit_id":"c55a1ede3a3a8ca384e4b328c14472a65a77af6a","original_commit_id":"c55a1ede3a3a8ca384e4b328c14472a65a77af6a","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":"Unexpected var, use let or const instead         no-var<br>Unable to resolve path to module '../../server'  import/no-unresolved","created_at":"2017-12-03T21:24:14Z","updated_at":"2017-12-03T21:24:16Z","html_url":"https://github.com/andela/k2-cfh/pull/29#discussion_r154537148","pull_request_url":"https://api.github.com/repos/andela/k2-cfh/pulls/29","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/andela/k2-cfh/pulls/comments/154537148"},"html":{"href":"https://github.com/andela/k2-cfh/pull/29#discussion_r154537148"},"pull_request":{"href":"https://api.github.com/repos/andela/k2-cfh/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/andela/k2-cfh/pulls/29","id":156081419,"html_url":"https://github.com/andela/k2-cfh/pull/29","diff_url":"https://github.com/andela/k2-cfh/pull/29.diff","patch_url":"https://github.com/andela/k2-cfh/pull/29.patch","issue_url":"https://api.github.com/repos/andela/k2-cfh/issues/29","number":29,"state":"open","locked":false,"title":"#153009255 Users should receive a JWT on successful signup","user":{"login":"codestaintin","id":4518420,"avatar_url":"https://avatars3.githubusercontent.com/u/4518420?v=4","gravatar_id":"","url":"https://api.github.com/users/codestaintin","html_url":"https://github.com/codestaintin","followers_url":"https://api.github.com/users/codestaintin/followers","following_url":"https://api.github.com/users/codestaintin/following{/other_user}","gists_url":"https://api.github.com/users/codestaintin/gists{/gist_id}","starred_url":"https://api.github.com/users/codestaintin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codestaintin/subscriptions","organizations_url":"https://api.github.com/users/codestaintin/orgs","repos_url":"https://api.github.com/users/codestaintin/repos","events_url":"https://api.github.com/users/codestaintin/events{/privacy}","received_events_url":"https://api.github.com/users/codestaintin/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\n\r\nUsers should receive a JWT on successful signup\r\n\r\n#### Description of Task to be completed?\r\n\r\n- Install jsonwebtoken package\r\n- Add token secret to .env file\r\n- Create endpoint to test signup functionality\r\n- Create signup function with JWT\r\n- Create middleware for token functionality\r\n- Install chai assertion library and chai-http\r\n- Write test suites for signup functionality\r\n\r\n#### How should this be manually tested?\r\n- Clone the repository\r\n- Run `git checkout feature/153009255/jwt-on-signup`\r\n- Run `npm start`\r\n- Send a post request to localhost:3000/api/auth/signup via postman user credentials\r\n\r\n#### Any background context you want to provide?\r\n\r\nN/A\r\n\r\n#### What are the relevant pivotal tracker stories?\r\n\r\n- story type: feature\r\n- story id: 153009255\r\n- story title: Users should receive a JWT on successful signup\r\n\r\n#### Screenshots (if appropriate)\r\n<img width=\"1440\" alt=\"screen shot 2017-11-29 at 11 43 19 pm\" src=\"https://user-images.githubusercontent.com/4518420/33403064-279a2fa0-d55f-11e7-9879-364cdddb65fe.png\">\r\n\r\n\r\n#### Questions:\r\n\r\nN/A","created_at":"2017-12-03T21:23:58Z","updated_at":"2017-12-03T21:24:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"be0e8513e807fa7850cc242368cf0d4382f5d977","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/k2-cfh/pulls/29/commits","review_comments_url":"https://api.github.com/repos/andela/k2-cfh/pulls/29/comments","review_comment_url":"https://api.github.com/repos/andela/k2-cfh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/k2-cfh/issues/29/comments","statuses_url":"https://api.github.com/repos/andela/k2-cfh/statuses/c55a1ede3a3a8ca384e4b328c14472a65a77af6a","head":{"label":"andela:feature/153009255/jwt-on-signup","ref":"feature/153009255/jwt-on-signup","sha":"c55a1ede3a3a8ca384e4b328c14472a65a77af6a","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":110507844,"name":"k2-cfh","full_name":"andela/k2-cfh","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/k2-cfh","description":null,"fork":false,"url":"https://api.github.com/repos/andela/k2-cfh","forks_url":"https://api.github.com/repos/andela/k2-cfh/forks","keys_url":"https://api.github.com/repos/andela/k2-cfh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/k2-cfh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/k2-cfh/teams","hooks_url":"https://api.github.com/repos/andela/k2-cfh/hooks","issue_events_url":"https://api.github.com/repos/andela/k2-cfh/issues/events{/number}","events_url":"https://api.github.com/repos/andela/k2-cfh/events","assignees_url":"https://api.github.com/repos/andela/k2-cfh/assignees{/user}","branches_url":"https://api.github.com/repos/andela/k2-cfh/branches{/branch}","tags_url":"https://api.github.com/repos/andela/k2-cfh/tags","blobs_url":"https://api.github.com/repos/andela/k2-cfh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/k2-cfh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/k2-cfh/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/k2-cfh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/k2-cfh/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/k2-cfh/languages","stargazers_url":"https://api.github.com/repos/andela/k2-cfh/stargazers","contributors_url":"https://api.github.com/repos/andela/k2-cfh/contributors","subscribers_url":"https://api.github.com/repos/andela/k2-cfh/subscribers","subscription_url":"https://api.github.com/repos/andela/k2-cfh/subscription","commits_url":"https://api.github.com/repos/andela/k2-cfh/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/k2-cfh/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/k2-cfh/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/k2-cfh/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/k2-cfh/contents/{+path}","compare_url":"https://api.github.com/repos/andela/k2-cfh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/k2-cfh/merges","archive_url":"https://api.github.com/repos/andela/k2-cfh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/k2-cfh/downloads","issues_url":"https://api.github.com/repos/andela/k2-cfh/issues{/number}","pulls_url":"https://api.github.com/repos/andela/k2-cfh/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/k2-cfh/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/k2-cfh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/k2-cfh/labels{/name}","releases_url":"https://api.github.com/repos/andela/k2-cfh/releases{/id}","deployments_url":"https://api.github.com/repos/andela/k2-cfh/deployments","created_at":"2017-11-13T06:16:22Z","updated_at":"2017-11-20T09:45:43Z","pushed_at":"2017-12-03T21:23:59Z","git_url":"git://github.com/andela/k2-cfh.git","ssh_url":"git@github.com:andela/k2-cfh.git","clone_url":"https://github.com/andela/k2-cfh.git","svn_url":"https://github.com/andela/k2-cfh","homepage":null,"size":9640,"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":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"staging"}},"base":{"label":"andela:staging","ref":"staging","sha":"b954dc6bd741950e39c432b6015abca1da1e5c16","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":110507844,"name":"k2-cfh","full_name":"andela/k2-cfh","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/k2-cfh","description":null,"fork":false,"url":"https://api.github.com/repos/andela/k2-cfh","forks_url":"https://api.github.com/repos/andela/k2-cfh/forks","keys_url":"https://api.github.com/repos/andela/k2-cfh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/k2-cfh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/k2-cfh/teams","hooks_url":"https://api.github.com/repos/andela/k2-cfh/hooks","issue_events_url":"https://api.github.com/repos/andela/k2-cfh/issues/events{/number}","events_url":"https://api.github.com/repos/andela/k2-cfh/events","assignees_url":"https://api.github.com/repos/andela/k2-cfh/assignees{/user}","branches_url":"https://api.github.com/repos/andela/k2-cfh/branches{/branch}","tags_url":"https://api.github.com/repos/andela/k2-cfh/tags","blobs_url":"https://api.github.com/repos/andela/k2-cfh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/k2-cfh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/k2-cfh/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/k2-cfh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/k2-cfh/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/k2-cfh/languages","stargazers_url":"https://api.github.com/repos/andela/k2-cfh/stargazers","contributors_url":"https://api.github.com/repos/andela/k2-cfh/contributors","subscribers_url":"https://api.github.com/repos/andela/k2-cfh/subscribers","subscription_url":"https://api.github.com/repos/andela/k2-cfh/subscription","commits_url":"https://api.github.com/repos/andela/k2-cfh/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/k2-cfh/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/k2-cfh/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/k2-cfh/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/k2-cfh/contents/{+path}","compare_url":"https://api.github.com/repos/andela/k2-cfh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/k2-cfh/merges","archive_url":"https://api.github.com/repos/andela/k2-cfh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/k2-cfh/downloads","issues_url":"https://api.github.com/repos/andela/k2-cfh/issues{/number}","pulls_url":"https://api.github.com/repos/andela/k2-cfh/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/k2-cfh/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/k2-cfh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/k2-cfh/labels{/name}","releases_url":"https://api.github.com/repos/andela/k2-cfh/releases{/id}","deployments_url":"https://api.github.com/repos/andela/k2-cfh/deployments","created_at":"2017-11-13T06:16:22Z","updated_at":"2017-11-20T09:45:43Z","pushed_at":"2017-12-03T21:23:59Z","git_url":"git://github.com/andela/k2-cfh.git","ssh_url":"git@github.com:andela/k2-cfh.git","clone_url":"https://github.com/andela/k2-cfh.git","svn_url":"https://github.com/andela/k2-cfh","homepage":null,"size":9640,"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":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/k2-cfh/pulls/29"},"html":{"href":"https://github.com/andela/k2-cfh/pull/29"},"issue":{"href":"https://api.github.com/repos/andela/k2-cfh/issues/29"},"comments":{"href":"https://api.github.com/repos/andela/k2-cfh/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/k2-cfh/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/k2-cfh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/k2-cfh/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/andela/k2-cfh/statuses/c55a1ede3a3a8ca384e4b328c14472a65a77af6a"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"houndci-bot"}}