{"action":"created","comment":{"url":"https://api.github.com/repos/andela/project-kinsan/pulls/comments/81166043","pull_request_review_id":2166132,"id":81166043,"diff_hunk":"@@ -0,0 +1,80 @@\n+(function () {\n+  'use strict';\n+  var expect = require('chai').expect;\n+  var request = require('request');\n+  var token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyIkX18iOnsic3RyaWN0TW9kZSI6dHJ1ZSwiZ2V0dGVycyI6e30sIndhc1BvcHVsYXRlZCI6ZmFsc2UsImFjdGl2ZVBhdGhzIjp7InBhdGhzIjp7Il9fdiI6ImluaXQiLCJhZG1pbiI6ImluaXQiLCJwYXNzd29yZCI6ImluaXQiLCJuYW1lIjoiaW5pdCIsIl9pZCI6ImluaXQifSwic3RhdGVzIjp7Imlnbm9yZSI6e30sImRlZmF1bHQiOnt9LCJpbml0Ijp7Il9fdiI6dHJ1ZSwiYWRtaW4iOnRydWUsInBhc3N3b3JkIjp0cnVlLCJuYW1lIjp0cnVlLCJfaWQiOnRydWV9LCJtb2RpZnkiOnt9LCJyZXF1aXJlIjp7fX0sInN0YXRlTmFtZXMiOlsicmVxdWlyZSIsIm1vZGlmeSIsImluaXQiLCJkZWZhdWx0IiwiaWdub3JlIl19LCJlbWl0dGVyIjp7ImRvbWFpbiI6bnVsbCwiX2V2ZW50cyI6e30sIl9ldmVudHNDb3VudCI6MCwiX21heExpc3RlbmVycyI6MH19LCJpc05ldyI6ZmFsc2UsIl9kb2MiOnsiX192IjowLCJhZG1pbiI6dHJ1ZSwicGFzc3dvcmQiOiJzYW1wbGUiLCJuYW1lIjoidXNlciIsIl9pZCI6IjU3ZWJhZjYwYzc3NDhhMzg0MzZlMWI3MSJ9LCJfcHJlcyI6eyIkX19vcmlnaW5hbF9zYXZlIjpbbnVsbCxudWxsXSwiJF9fb3JpZ2luYWxfdmFsaWRhdGUiOltudWxsXSwiJF9fb3JpZ2luYWxfcmVtb3ZlIjpbbnVsbF19LCJfcG9zdHMiOnsiJF9fb3JpZ2luYWxfc2F2ZSI6W10sIiRfX29yaWdpbmFsX3ZhbGlkYXRlIjpbXSwiJF9fb3JpZ2luYWxfcmVtb3ZlIjpbXX0sImlhdCI6MTQ3NTA2NTQ0NywiZXhwIjoxNDc1MTUxODQ3fQ.TleJIly8m1RHNIFGSdLjLECC0QfGLInq0xBMf65bC64';\n+\n+  describe('Signup', function () {\n+    var url = 'http://localhost:3000/api/auth/signup';\n+\n+    before( function (done) {\n+      request({url:url, method: \"DELETE\", json: {","path":"test/server/signup-spec.js","position":11,"original_position":11,"commit_id":"1acf2f64e7c5d67ca9b8bf271e3c517ce5d98dca","original_commit_id":"1acf2f64e7c5d67ca9b8bf271e3c517ce5d98dca","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","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":"Strings must use singlequote                             quotes","created_at":"2016-09-29T15:36:16Z","updated_at":"2016-09-29T15:36:16Z","html_url":"https://github.com/andela/project-kinsan/pull/8#discussion_r81166043","pull_request_url":"https://api.github.com/repos/andela/project-kinsan/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/andela/project-kinsan/pulls/comments/81166043"},"html":{"href":"https://github.com/andela/project-kinsan/pull/8#discussion_r81166043"},"pull_request":{"href":"https://api.github.com/repos/andela/project-kinsan/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/andela/project-kinsan/pulls/8","id":87338111,"html_url":"https://github.com/andela/project-kinsan/pull/8","diff_url":"https://github.com/andela/project-kinsan/pull/8.diff","patch_url":"https://github.com/andela/project-kinsan/pull/8.patch","issue_url":"https://api.github.com/repos/andela/project-kinsan/issues/8","number":8,"state":"open","locked":false,"title":"Feature/130341343/signup with jwt","user":{"login":"andela-abisoye","id":15850770,"avatar_url":"https://avatars.githubusercontent.com/u/15850770?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-abisoye","html_url":"https://github.com/andela-abisoye","followers_url":"https://api.github.com/users/andela-abisoye/followers","following_url":"https://api.github.com/users/andela-abisoye/following{/other_user}","gists_url":"https://api.github.com/users/andela-abisoye/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-abisoye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-abisoye/subscriptions","organizations_url":"https://api.github.com/users/andela-abisoye/orgs","repos_url":"https://api.github.com/users/andela-abisoye/repos","events_url":"https://api.github.com/users/andela-abisoye/events{/privacy}","received_events_url":"https://api.github.com/users/andela-abisoye/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\n- This PR creates an api for signing up that returns a [JWT](https://jwt.io/introduction/).\r\n\r\n#### Description of Task to be completed?\r\n- Users once authenticated via the signup api should be returned a JWT to be required on subsequent call to all other endpoints that require authentication.\r\n- The criteria are:\r\n  - GIVEN user successfully signs up or logs in\r\n  - WHEN user passes appropriate JSON object to the /api/auth/signup endpoint\r\n  - THEN user should receive a JWT as the response\r\n\r\n#### How should this be manually tested?\r\n- This should be tested using the command ``` mocha test/server/signup-spec.js ```\r\n\r\n#### What are the relevant pivotal tracker stories?\r\n- Feature/#130341343\r\n\r\n#### Screenshots (if appropriate)\r\n- When a user tries to sign up without the complete details\r\n![screenshot 003](https://cloud.githubusercontent.com/assets/15850770/18960737/b1d75faa-8662-11e6-81c8-f2ad0a3d7f61.png)\r\n\r\n- When a user already exists\r\n![screenshot001](https://cloud.githubusercontent.com/assets/15850770/18960660/73956cb4-8662-11e6-9ce6-7e74b7b335a3.png)\r\n\r\n- Successful sign up.\r\n![screenshot002](https://cloud.githubusercontent.com/assets/15850770/18960670/7a0038b8-8662-11e6-9d85-60f825e2265a.png)\r\n\r\n","created_at":"2016-09-29T15:36:04Z","updated_at":"2016-09-29T15:36:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a46cc43c93cfa7ea7e4873a7097f2499dce97373","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/project-kinsan/pulls/8/commits","review_comments_url":"https://api.github.com/repos/andela/project-kinsan/pulls/8/comments","review_comment_url":"https://api.github.com/repos/andela/project-kinsan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/project-kinsan/issues/8/comments","statuses_url":"https://api.github.com/repos/andela/project-kinsan/statuses/1acf2f64e7c5d67ca9b8bf271e3c517ce5d98dca","head":{"label":"andela:feature/130341343/signup-with-jwt","ref":"feature/130341343/signup-with-jwt","sha":"1acf2f64e7c5d67ca9b8bf271e3c517ce5d98dca","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","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":67411323,"name":"project-kinsan","full_name":"andela/project-kinsan","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","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/project-kinsan","description":null,"fork":false,"url":"https://api.github.com/repos/andela/project-kinsan","forks_url":"https://api.github.com/repos/andela/project-kinsan/forks","keys_url":"https://api.github.com/repos/andela/project-kinsan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/project-kinsan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/project-kinsan/teams","hooks_url":"https://api.github.com/repos/andela/project-kinsan/hooks","issue_events_url":"https://api.github.com/repos/andela/project-kinsan/issues/events{/number}","events_url":"https://api.github.com/repos/andela/project-kinsan/events","assignees_url":"https://api.github.com/repos/andela/project-kinsan/assignees{/user}","branches_url":"https://api.github.com/repos/andela/project-kinsan/branches{/branch}","tags_url":"https://api.github.com/repos/andela/project-kinsan/tags","blobs_url":"https://api.github.com/repos/andela/project-kinsan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/project-kinsan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/project-kinsan/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/project-kinsan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/project-kinsan/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/project-kinsan/languages","stargazers_url":"https://api.github.com/repos/andela/project-kinsan/stargazers","contributors_url":"https://api.github.com/repos/andela/project-kinsan/contributors","subscribers_url":"https://api.github.com/repos/andela/project-kinsan/subscribers","subscription_url":"https://api.github.com/repos/andela/project-kinsan/subscription","commits_url":"https://api.github.com/repos/andela/project-kinsan/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/project-kinsan/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/project-kinsan/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/project-kinsan/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/project-kinsan/contents/{+path}","compare_url":"https://api.github.com/repos/andela/project-kinsan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/project-kinsan/merges","archive_url":"https://api.github.com/repos/andela/project-kinsan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/project-kinsan/downloads","issues_url":"https://api.github.com/repos/andela/project-kinsan/issues{/number}","pulls_url":"https://api.github.com/repos/andela/project-kinsan/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/project-kinsan/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/project-kinsan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/project-kinsan/labels{/name}","releases_url":"https://api.github.com/repos/andela/project-kinsan/releases{/id}","deployments_url":"https://api.github.com/repos/andela/project-kinsan/deployments","created_at":"2016-09-05T10:24:59Z","updated_at":"2016-09-06T23:17:17Z","pushed_at":"2016-09-29T15:36:05Z","git_url":"git://github.com/andela/project-kinsan.git","ssh_url":"git@github.com:andela/project-kinsan.git","clone_url":"https://github.com/andela/project-kinsan.git","svn_url":"https://github.com/andela/project-kinsan","homepage":null,"size":9244,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"andela:develop","ref":"develop","sha":"0d766abd60aac74b73ed58d92b9c9b524665e4ff","user":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","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":67411323,"name":"project-kinsan","full_name":"andela/project-kinsan","owner":{"login":"andela","id":4100206,"avatar_url":"https://avatars.githubusercontent.com/u/4100206?v=3","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/project-kinsan","description":null,"fork":false,"url":"https://api.github.com/repos/andela/project-kinsan","forks_url":"https://api.github.com/repos/andela/project-kinsan/forks","keys_url":"https://api.github.com/repos/andela/project-kinsan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/project-kinsan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/project-kinsan/teams","hooks_url":"https://api.github.com/repos/andela/project-kinsan/hooks","issue_events_url":"https://api.github.com/repos/andela/project-kinsan/issues/events{/number}","events_url":"https://api.github.com/repos/andela/project-kinsan/events","assignees_url":"https://api.github.com/repos/andela/project-kinsan/assignees{/user}","branches_url":"https://api.github.com/repos/andela/project-kinsan/branches{/branch}","tags_url":"https://api.github.com/repos/andela/project-kinsan/tags","blobs_url":"https://api.github.com/repos/andela/project-kinsan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/project-kinsan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/project-kinsan/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/project-kinsan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/project-kinsan/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/project-kinsan/languages","stargazers_url":"https://api.github.com/repos/andela/project-kinsan/stargazers","contributors_url":"https://api.github.com/repos/andela/project-kinsan/contributors","subscribers_url":"https://api.github.com/repos/andela/project-kinsan/subscribers","subscription_url":"https://api.github.com/repos/andela/project-kinsan/subscription","commits_url":"https://api.github.com/repos/andela/project-kinsan/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/project-kinsan/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/project-kinsan/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/project-kinsan/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/project-kinsan/contents/{+path}","compare_url":"https://api.github.com/repos/andela/project-kinsan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/project-kinsan/merges","archive_url":"https://api.github.com/repos/andela/project-kinsan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/project-kinsan/downloads","issues_url":"https://api.github.com/repos/andela/project-kinsan/issues{/number}","pulls_url":"https://api.github.com/repos/andela/project-kinsan/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/project-kinsan/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/project-kinsan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/project-kinsan/labels{/name}","releases_url":"https://api.github.com/repos/andela/project-kinsan/releases{/id}","deployments_url":"https://api.github.com/repos/andela/project-kinsan/deployments","created_at":"2016-09-05T10:24:59Z","updated_at":"2016-09-06T23:17:17Z","pushed_at":"2016-09-29T15:36:05Z","git_url":"git://github.com/andela/project-kinsan.git","ssh_url":"git@github.com:andela/project-kinsan.git","clone_url":"https://github.com/andela/project-kinsan.git","svn_url":"https://github.com/andela/project-kinsan","homepage":null,"size":9244,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/project-kinsan/pulls/8"},"html":{"href":"https://github.com/andela/project-kinsan/pull/8"},"issue":{"href":"https://api.github.com/repos/andela/project-kinsan/issues/8"},"comments":{"href":"https://api.github.com/repos/andela/project-kinsan/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/project-kinsan/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/project-kinsan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/project-kinsan/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/andela/project-kinsan/statuses/1acf2f64e7c5d67ca9b8bf271e3c517ce5d98dca"}}}}
{"actor":{"display_login":"houndci-bot"}}