{"action":"created","comment":{"url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/pulls/comments/78947055","id":78947055,"diff_hunk":"@@ -0,0 +1,193 @@\n+var app = require('../index');\n+var request = require('supertest')(app);\n+var expect = require('chai').expect;\n+var User = require('../server/models/user');\n+\n+describe('user test suite', function () {\n+  var token;\n+  var userId;\n+\n+  before(function (done) {\n+    request\n+      .post('/api/users/login')\n+      .send({\n+        email: 'jwarugu@gmail.com',\n+        password: 'jwarugu'\n+      })\n+      .end(function (err, res) {\n+        if (err) { return done(err); }\n+        token = res.body.token;\n+        done();\n+      });\n+  });\n+\n+  describe('/users CRUD operations', function () {\n+    it('route that returns all users', function (done) {\n+      request\n+        .get('/api/users')\n+        .set('x-access-token', token)\n+        .expect(200)\n+        .end(function (err, res) {\n+          expect(res.body).to.have.length(4);\n+          expect(Array.isArray(res.body)).to.equal(true);\n+          userId = res.body[0]._id;","path":"tests/user.js","position":33,"original_position":33,"commit_id":"678f91121c8017bc398a9928b22ecff2ec9b4888","original_commit_id":"678f91121c8017bc398a9928b22ecff2ec9b4888","user":{"login":"andela-jkithome","id":13940216,"avatar_url":"https://avatars.githubusercontent.com/u/13940216?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-jkithome","html_url":"https://github.com/andela-jkithome","followers_url":"https://api.github.com/users/andela-jkithome/followers","following_url":"https://api.github.com/users/andela-jkithome/following{/other_user}","gists_url":"https://api.github.com/users/andela-jkithome/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-jkithome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-jkithome/subscriptions","organizations_url":"https://api.github.com/users/andela-jkithome/orgs","repos_url":"https://api.github.com/users/andela-jkithome/repos","events_url":"https://api.github.com/users/andela-jkithome/events{/privacy}","received_events_url":"https://api.github.com/users/andela-jkithome/received_events","type":"User","site_admin":false},"body":"Assert that array elements are objects.","created_at":"2016-09-15T12:01:03Z","updated_at":"2016-09-15T12:01:03Z","html_url":"https://github.com/andela-jwarugu/Document-Management-System/pull/1#discussion_r78947055","pull_request_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/pulls/comments/78947055"},"html":{"href":"https://github.com/andela-jwarugu/Document-Management-System/pull/1#discussion_r78947055"},"pull_request":{"href":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/pulls/1","id":85367045,"html_url":"https://github.com/andela-jwarugu/Document-Management-System/pull/1","diff_url":"https://github.com/andela-jwarugu/Document-Management-System/pull/1.diff","patch_url":"https://github.com/andela-jwarugu/Document-Management-System/pull/1.patch","issue_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/issues/1","number":1,"state":"open","locked":false,"title":"Merge develop into master","user":{"login":"andela-jwarugu","id":19430074,"avatar_url":"https://avatars.githubusercontent.com/u/19430074?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-jwarugu","html_url":"https://github.com/andela-jwarugu","followers_url":"https://api.github.com/users/andela-jwarugu/followers","following_url":"https://api.github.com/users/andela-jwarugu/following{/other_user}","gists_url":"https://api.github.com/users/andela-jwarugu/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-jwarugu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-jwarugu/subscriptions","organizations_url":"https://api.github.com/users/andela-jwarugu/orgs","repos_url":"https://api.github.com/users/andela-jwarugu/repos","events_url":"https://api.github.com/users/andela-jwarugu/events{/privacy}","received_events_url":"https://api.github.com/users/andela-jwarugu/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-15T08:58:52Z","updated_at":"2016-09-15T12:01:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/pulls/1/commits","review_comments_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/pulls/1/comments","review_comment_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/issues/1/comments","statuses_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/statuses/678f91121c8017bc398a9928b22ecff2ec9b4888","head":{"label":"andela-jwarugu:develop","ref":"develop","sha":"678f91121c8017bc398a9928b22ecff2ec9b4888","user":{"login":"andela-jwarugu","id":19430074,"avatar_url":"https://avatars.githubusercontent.com/u/19430074?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-jwarugu","html_url":"https://github.com/andela-jwarugu","followers_url":"https://api.github.com/users/andela-jwarugu/followers","following_url":"https://api.github.com/users/andela-jwarugu/following{/other_user}","gists_url":"https://api.github.com/users/andela-jwarugu/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-jwarugu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-jwarugu/subscriptions","organizations_url":"https://api.github.com/users/andela-jwarugu/orgs","repos_url":"https://api.github.com/users/andela-jwarugu/repos","events_url":"https://api.github.com/users/andela-jwarugu/events{/privacy}","received_events_url":"https://api.github.com/users/andela-jwarugu/received_events","type":"User","site_admin":false},"repo":{"id":65013219,"name":"Document-Management-System","full_name":"andela-jwarugu/Document-Management-System","owner":{"login":"andela-jwarugu","id":19430074,"avatar_url":"https://avatars.githubusercontent.com/u/19430074?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-jwarugu","html_url":"https://github.com/andela-jwarugu","followers_url":"https://api.github.com/users/andela-jwarugu/followers","following_url":"https://api.github.com/users/andela-jwarugu/following{/other_user}","gists_url":"https://api.github.com/users/andela-jwarugu/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-jwarugu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-jwarugu/subscriptions","organizations_url":"https://api.github.com/users/andela-jwarugu/orgs","repos_url":"https://api.github.com/users/andela-jwarugu/repos","events_url":"https://api.github.com/users/andela-jwarugu/events{/privacy}","received_events_url":"https://api.github.com/users/andela-jwarugu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-jwarugu/Document-Management-System","description":"Checkpoint 3","fork":false,"url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System","forks_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/forks","keys_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/teams","hooks_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/hooks","issue_events_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/issues/events{/number}","events_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/events","assignees_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/assignees{/user}","branches_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/branches{/branch}","tags_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/tags","blobs_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/languages","stargazers_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/stargazers","contributors_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/contributors","subscribers_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/subscribers","subscription_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/subscription","commits_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/contents/{+path}","compare_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/merges","archive_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/downloads","issues_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/issues{/number}","pulls_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/labels{/name}","releases_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/releases{/id}","deployments_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/deployments","created_at":"2016-08-05T11:19:47Z","updated_at":"2016-08-05T11:21:05Z","pushed_at":"2016-09-15T08:58:52Z","git_url":"git://github.com/andela-jwarugu/Document-Management-System.git","ssh_url":"git@github.com:andela-jwarugu/Document-Management-System.git","clone_url":"https://github.com/andela-jwarugu/Document-Management-System.git","svn_url":"https://github.com/andela-jwarugu/Document-Management-System","homepage":null,"size":52,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"andela-jwarugu:master","ref":"master","sha":"5b54d619df1254a496763cfe34e4d90e7f7d78c9","user":{"login":"andela-jwarugu","id":19430074,"avatar_url":"https://avatars.githubusercontent.com/u/19430074?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-jwarugu","html_url":"https://github.com/andela-jwarugu","followers_url":"https://api.github.com/users/andela-jwarugu/followers","following_url":"https://api.github.com/users/andela-jwarugu/following{/other_user}","gists_url":"https://api.github.com/users/andela-jwarugu/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-jwarugu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-jwarugu/subscriptions","organizations_url":"https://api.github.com/users/andela-jwarugu/orgs","repos_url":"https://api.github.com/users/andela-jwarugu/repos","events_url":"https://api.github.com/users/andela-jwarugu/events{/privacy}","received_events_url":"https://api.github.com/users/andela-jwarugu/received_events","type":"User","site_admin":false},"repo":{"id":65013219,"name":"Document-Management-System","full_name":"andela-jwarugu/Document-Management-System","owner":{"login":"andela-jwarugu","id":19430074,"avatar_url":"https://avatars.githubusercontent.com/u/19430074?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-jwarugu","html_url":"https://github.com/andela-jwarugu","followers_url":"https://api.github.com/users/andela-jwarugu/followers","following_url":"https://api.github.com/users/andela-jwarugu/following{/other_user}","gists_url":"https://api.github.com/users/andela-jwarugu/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-jwarugu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-jwarugu/subscriptions","organizations_url":"https://api.github.com/users/andela-jwarugu/orgs","repos_url":"https://api.github.com/users/andela-jwarugu/repos","events_url":"https://api.github.com/users/andela-jwarugu/events{/privacy}","received_events_url":"https://api.github.com/users/andela-jwarugu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-jwarugu/Document-Management-System","description":"Checkpoint 3","fork":false,"url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System","forks_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/forks","keys_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/teams","hooks_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/hooks","issue_events_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/issues/events{/number}","events_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/events","assignees_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/assignees{/user}","branches_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/branches{/branch}","tags_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/tags","blobs_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/languages","stargazers_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/stargazers","contributors_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/contributors","subscribers_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/subscribers","subscription_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/subscription","commits_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/contents/{+path}","compare_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/merges","archive_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/downloads","issues_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/issues{/number}","pulls_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/labels{/name}","releases_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/releases{/id}","deployments_url":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/deployments","created_at":"2016-08-05T11:19:47Z","updated_at":"2016-08-05T11:21:05Z","pushed_at":"2016-09-15T08:58:52Z","git_url":"git://github.com/andela-jwarugu/Document-Management-System.git","ssh_url":"git@github.com:andela-jwarugu/Document-Management-System.git","clone_url":"https://github.com/andela-jwarugu/Document-Management-System.git","svn_url":"https://github.com/andela-jwarugu/Document-Management-System","homepage":null,"size":52,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/pulls/1"},"html":{"href":"https://github.com/andela-jwarugu/Document-Management-System/pull/1"},"issue":{"href":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/issues/1"},"comments":{"href":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/andela-jwarugu/Document-Management-System/statuses/678f91121c8017bc398a9928b22ecff2ec9b4888"}}}}
{"actor":{"display_login":"andela-jkithome"}}