{"action":"created","comment":{"url":"https://api.github.com/repos/andela/banasko-cfh/pulls/comments/89944949","pull_request_review_id":10472273,"id":89944949,"diff_hunk":"@@ -0,0 +1,70 @@\n+const mongoose = require('mongoose');\n+const chai = require('chai');\n+const User = require('./../../app/models/user');\n+const chaiHttp = require('chai-http');\n+const server = require('./../../server');\n+chai.use(chaiHttp);\n+const should = chai.should();\n+const expect = chai.expect;\n+const url = '/api/auth/signup';\n+\n+describe('Signup', () => {\n+  it('verifies that signup fails for incomplete details', (done) => {\n+    let user = {\n+      name: 'testUser1',\n+      email: '',\n+      password: '',\n+      avatar: 'avatar011'\n+    };\n+\n+    chai.request(server)\n+      .post(url)\n+      .send(user)\n+      .end((err, res) => {\n+        res.body.should.have.property('message').eql('Incomplete SignUp Details Provided.')\n+        done();\n+      });\n+  });\n+\n+\n+  it('verifies that signup is sucessful', (done) => {\n+    let user = {\n+      name: 'Andela',\n+      email: 'andela@yahoo.com',\n+      password: '12345',\n+      avatar: 'andela1'\n+    };\n+\n+    chai.request(server)\n+      .post('/api/auth/signup')\n+      .send(user)\n+      .end((err, res) => {\n+        expect(res.body.message).to.equal('Thank you for signing up!');\n+        expect(typeof res.body.token).to.equal('string');\n+        expect(res).to.have.header('content-type', 'application/json; charset=utf-8');\n+        expect(res).to.have.status(200);\n+        done();\n+      });","path":"test/client/signup-test.js","position":47,"original_position":47,"commit_id":"d3ba8ad3e270f134ad805e313b6ddfa52f06da09","original_commit_id":"d3ba8ad3e270f134ad805e313b6ddfa52f06da09","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":"Missing \"use strict\" statement.","created_at":"2016-11-29T05:51:32Z","updated_at":"2016-11-29T05:51:32Z","html_url":"https://github.com/andela/banasko-cfh/pull/10#discussion_r89944949","pull_request_url":"https://api.github.com/repos/andela/banasko-cfh/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/andela/banasko-cfh/pulls/comments/89944949"},"html":{"href":"https://github.com/andela/banasko-cfh/pull/10#discussion_r89944949"},"pull_request":{"href":"https://api.github.com/repos/andela/banasko-cfh/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/andela/banasko-cfh/pulls/10","id":95472873,"html_url":"https://github.com/andela/banasko-cfh/pull/10","diff_url":"https://github.com/andela/banasko-cfh/pull/10.diff","patch_url":"https://github.com/andela/banasko-cfh/pull/10.patch","issue_url":"https://api.github.com/repos/andela/banasko-cfh/issues/10","number":10,"state":"open","locked":false,"title":"#134249129/login with jwt","user":{"login":"andela-emurphy","id":23451291,"avatar_url":"https://avatars.githubusercontent.com/u/23451291?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-emurphy","html_url":"https://github.com/andela-emurphy","followers_url":"https://api.github.com/users/andela-emurphy/followers","following_url":"https://api.github.com/users/andela-emurphy/following{/other_user}","gists_url":"https://api.github.com/users/andela-emurphy/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-emurphy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-emurphy/subscriptions","organizations_url":"https://api.github.com/users/andela-emurphy/orgs","repos_url":"https://api.github.com/users/andela-emurphy/repos","events_url":"https://api.github.com/users/andela-emurphy/events{/privacy}","received_events_url":"https://api.github.com/users/andela-emurphy/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?             \r\nThis PR ensures that once a user successfully login,  they receive a JSON web token for further authentication\r\n#### How should this be manually tested?     \r\nThis PR can be tested manually by running a local server and using POSTMAN. User should send their valid details (username and password) to this endpoint \"localhost:port/api/auth/login\". The port should be set in the .env file.\r\n                                             ","created_at":"2016-11-28T10:31:55Z","updated_at":"2016-11-29T05:51:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"850e3fc83e841782ebaa9f62f8eac1676b60ba22","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/banasko-cfh/pulls/10/commits","review_comments_url":"https://api.github.com/repos/andela/banasko-cfh/pulls/10/comments","review_comment_url":"https://api.github.com/repos/andela/banasko-cfh/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/banasko-cfh/issues/10/comments","statuses_url":"https://api.github.com/repos/andela/banasko-cfh/statuses/d3ba8ad3e270f134ad805e313b6ddfa52f06da09","head":{"label":"andela:feature/134249129/login-with-jwt","ref":"feature/134249129/login-with-jwt","sha":"d3ba8ad3e270f134ad805e313b6ddfa52f06da09","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":73644823,"name":"banasko-cfh","full_name":"andela/banasko-cfh","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/banasko-cfh","description":null,"fork":false,"url":"https://api.github.com/repos/andela/banasko-cfh","forks_url":"https://api.github.com/repos/andela/banasko-cfh/forks","keys_url":"https://api.github.com/repos/andela/banasko-cfh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/banasko-cfh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/banasko-cfh/teams","hooks_url":"https://api.github.com/repos/andela/banasko-cfh/hooks","issue_events_url":"https://api.github.com/repos/andela/banasko-cfh/issues/events{/number}","events_url":"https://api.github.com/repos/andela/banasko-cfh/events","assignees_url":"https://api.github.com/repos/andela/banasko-cfh/assignees{/user}","branches_url":"https://api.github.com/repos/andela/banasko-cfh/branches{/branch}","tags_url":"https://api.github.com/repos/andela/banasko-cfh/tags","blobs_url":"https://api.github.com/repos/andela/banasko-cfh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/banasko-cfh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/banasko-cfh/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/banasko-cfh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/banasko-cfh/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/banasko-cfh/languages","stargazers_url":"https://api.github.com/repos/andela/banasko-cfh/stargazers","contributors_url":"https://api.github.com/repos/andela/banasko-cfh/contributors","subscribers_url":"https://api.github.com/repos/andela/banasko-cfh/subscribers","subscription_url":"https://api.github.com/repos/andela/banasko-cfh/subscription","commits_url":"https://api.github.com/repos/andela/banasko-cfh/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/banasko-cfh/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/banasko-cfh/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/banasko-cfh/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/banasko-cfh/contents/{+path}","compare_url":"https://api.github.com/repos/andela/banasko-cfh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/banasko-cfh/merges","archive_url":"https://api.github.com/repos/andela/banasko-cfh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/banasko-cfh/downloads","issues_url":"https://api.github.com/repos/andela/banasko-cfh/issues{/number}","pulls_url":"https://api.github.com/repos/andela/banasko-cfh/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/banasko-cfh/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/banasko-cfh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/banasko-cfh/labels{/name}","releases_url":"https://api.github.com/repos/andela/banasko-cfh/releases{/id}","deployments_url":"https://api.github.com/repos/andela/banasko-cfh/deployments","created_at":"2016-11-13T21:42:09Z","updated_at":"2016-11-23T11:35:50Z","pushed_at":"2016-11-29T05:51:24Z","git_url":"git://github.com/andela/banasko-cfh.git","ssh_url":"git@github.com:andela/banasko-cfh.git","clone_url":"https://github.com/andela/banasko-cfh.git","svn_url":"https://github.com/andela/banasko-cfh","homepage":"https://banaskotest.herokuapp.com/#!/","size":9323,"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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"development"}},"base":{"label":"andela:development","ref":"development","sha":"c57a18f2fdf1ec61045bca07c8960a41b6309e60","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":73644823,"name":"banasko-cfh","full_name":"andela/banasko-cfh","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/banasko-cfh","description":null,"fork":false,"url":"https://api.github.com/repos/andela/banasko-cfh","forks_url":"https://api.github.com/repos/andela/banasko-cfh/forks","keys_url":"https://api.github.com/repos/andela/banasko-cfh/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/banasko-cfh/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/banasko-cfh/teams","hooks_url":"https://api.github.com/repos/andela/banasko-cfh/hooks","issue_events_url":"https://api.github.com/repos/andela/banasko-cfh/issues/events{/number}","events_url":"https://api.github.com/repos/andela/banasko-cfh/events","assignees_url":"https://api.github.com/repos/andela/banasko-cfh/assignees{/user}","branches_url":"https://api.github.com/repos/andela/banasko-cfh/branches{/branch}","tags_url":"https://api.github.com/repos/andela/banasko-cfh/tags","blobs_url":"https://api.github.com/repos/andela/banasko-cfh/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/banasko-cfh/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/banasko-cfh/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/banasko-cfh/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/banasko-cfh/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/banasko-cfh/languages","stargazers_url":"https://api.github.com/repos/andela/banasko-cfh/stargazers","contributors_url":"https://api.github.com/repos/andela/banasko-cfh/contributors","subscribers_url":"https://api.github.com/repos/andela/banasko-cfh/subscribers","subscription_url":"https://api.github.com/repos/andela/banasko-cfh/subscription","commits_url":"https://api.github.com/repos/andela/banasko-cfh/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/banasko-cfh/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/banasko-cfh/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/banasko-cfh/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/banasko-cfh/contents/{+path}","compare_url":"https://api.github.com/repos/andela/banasko-cfh/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/banasko-cfh/merges","archive_url":"https://api.github.com/repos/andela/banasko-cfh/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/banasko-cfh/downloads","issues_url":"https://api.github.com/repos/andela/banasko-cfh/issues{/number}","pulls_url":"https://api.github.com/repos/andela/banasko-cfh/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/banasko-cfh/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/banasko-cfh/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/banasko-cfh/labels{/name}","releases_url":"https://api.github.com/repos/andela/banasko-cfh/releases{/id}","deployments_url":"https://api.github.com/repos/andela/banasko-cfh/deployments","created_at":"2016-11-13T21:42:09Z","updated_at":"2016-11-23T11:35:50Z","pushed_at":"2016-11-29T05:51:24Z","git_url":"git://github.com/andela/banasko-cfh.git","ssh_url":"git@github.com:andela/banasko-cfh.git","clone_url":"https://github.com/andela/banasko-cfh.git","svn_url":"https://github.com/andela/banasko-cfh","homepage":"https://banaskotest.herokuapp.com/#!/","size":9323,"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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/banasko-cfh/pulls/10"},"html":{"href":"https://github.com/andela/banasko-cfh/pull/10"},"issue":{"href":"https://api.github.com/repos/andela/banasko-cfh/issues/10"},"comments":{"href":"https://api.github.com/repos/andela/banasko-cfh/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/banasko-cfh/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/banasko-cfh/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/banasko-cfh/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/andela/banasko-cfh/statuses/d3ba8ad3e270f134ad805e313b6ddfa52f06da09"}}}}
{"actor":{"display_login":"houndci-bot"}}