{"action":"created","comment":{"url":"https://api.github.com/repos/Financial-Times/next-myft-email/pulls/comments/68232175","id":68232175,"diff_hunk":"@@ -7,34 +7,39 @@ const uuid = require('node-uuid').v4;\n const invokeApex = require('../../../test/lib/invoke-apex');\n \n let followsFixture = sinon.stub().returns(Promise.resolve(require('./fixtures/follow-fixtures')));\n-const historyFixture = sinon.stub().returns(Promise.resolve(require('./fixtures/history-fixtures')));\n let contentFixture = sinon.stub().returns(Promise.resolve(require('./fixtures/content-fixtures')));\n+const historyFixture = sinon.stub().returns(Promise.resolve(require('./fixtures/history-fixtures')));\n const groupedFixture = sinon.stub().returns(require('./fixtures/grouped-fixtures'));\n-const recommendsFixture = sinon.stub().returns(Promise.resolve({recommends:[]}));\n-const generateEmailFixture = sinon.stub().returns(Promise.resolve({}));\n-const sendEmailFixture = sinon.stub().returns(Promise.resolve({}));\n-const metricsFixture = { count: sinon.stub() };\n const eventFixture = { uuid: uuid(), type: 'daily' };\n \n+const mocks = {\n+\tfetchUserRecommends: sinon.stub().returns(Promise.resolve({recommends:[]})),\n+\tgenerateEmail: sinon.stub().returns(Promise.resolve({})),\n+\tsendEmail: sinon.stub().returns(Promise.resolve({})),\n+\tmetrics: { count: sinon.stub() },\n+\tsortByMostViewed: (a) => Promise.resolve(a)\n+};\n+\n const fixtures = [\n \t{ path: './lib/fetch-user-follows', stub: followsFixture },\n \t{ path: './lib/fetch-user-content-history', stub: historyFixture },\n \t{ path: './lib/fetch-content-with-concepts', stub: contentFixture },\n-\t{ path: './fetch-user-recommends', stub: recommendsFixture },\n \t{ path: './lib/group-content', stub: groupedFixture },\n-\t{ path: './lib/email/generate-email', stub: generateEmailFixture },\n-\t{ path: './lib/email/send-email', stub: sendEmailFixture }\n+\t{ path: './fetch-user-recommends', stub: mocks.fetchUserRecommends },\n+\t{ path: './lib/email/generate-email', stub: mocks.generateEmail },\n+\t{ path: './lib/email/send-email', stub: mocks.sendEmail }\n ];\n \n \n-describe('Create email', () => {\n+describeg('Create email', () => {","path":"functions/create-email/test/index.spec.js","position":37,"original_position":37,"commit_id":"92a18d988a5438b1181b776dd16c4da11cdbeabd","original_commit_id":"92a18d988a5438b1181b776dd16c4da11cdbeabd","user":{"login":"keirog","id":150157,"avatar_url":"https://avatars.githubusercontent.com/u/150157?v=3","gravatar_id":"","url":"https://api.github.com/users/keirog","html_url":"https://github.com/keirog","followers_url":"https://api.github.com/users/keirog/followers","following_url":"https://api.github.com/users/keirog/following{/other_user}","gists_url":"https://api.github.com/users/keirog/gists{/gist_id}","starred_url":"https://api.github.com/users/keirog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keirog/subscriptions","organizations_url":"https://api.github.com/users/keirog/orgs","repos_url":"https://api.github.com/users/keirog/repos","events_url":"https://api.github.com/users/keirog/events{/privacy}","received_events_url":"https://api.github.com/users/keirog/received_events","type":"User","site_admin":false},"body":"describeg?","created_at":"2016-06-23T13:19:08Z","updated_at":"2016-06-23T13:19:08Z","html_url":"https://github.com/Financial-Times/next-myft-email/pull/181#discussion_r68232175","pull_request_url":"https://api.github.com/repos/Financial-Times/next-myft-email/pulls/181","_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/next-myft-email/pulls/comments/68232175"},"html":{"href":"https://github.com/Financial-Times/next-myft-email/pull/181#discussion_r68232175"},"pull_request":{"href":"https://api.github.com/repos/Financial-Times/next-myft-email/pulls/181"}}},"pull_request":{"url":"https://api.github.com/repos/Financial-Times/next-myft-email/pulls/181","id":74952979,"html_url":"https://github.com/Financial-Times/next-myft-email/pull/181","diff_url":"https://github.com/Financial-Times/next-myft-email/pull/181.diff","patch_url":"https://github.com/Financial-Times/next-myft-email/pull/181.patch","issue_url":"https://api.github.com/repos/Financial-Times/next-myft-email/issues/181","number":181,"state":"open","locked":false,"title":"remove redis dependency from tests","user":{"login":"laurieboyes","id":4622378,"avatar_url":"https://avatars.githubusercontent.com/u/4622378?v=3","gravatar_id":"","url":"https://api.github.com/users/laurieboyes","html_url":"https://github.com/laurieboyes","followers_url":"https://api.github.com/users/laurieboyes/followers","following_url":"https://api.github.com/users/laurieboyes/following{/other_user}","gists_url":"https://api.github.com/users/laurieboyes/gists{/gist_id}","starred_url":"https://api.github.com/users/laurieboyes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurieboyes/subscriptions","organizations_url":"https://api.github.com/users/laurieboyes/orgs","repos_url":"https://api.github.com/users/laurieboyes/repos","events_url":"https://api.github.com/users/laurieboyes/events{/privacy}","received_events_url":"https://api.github.com/users/laurieboyes/received_events","type":"User","site_admin":false},"body":"I thought the bit of refactoring I've done here was more relevant than it turned out to be","created_at":"2016-06-23T13:17:48Z","updated_at":"2016-06-23T13:19:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a6ec9ff1b39e6e3b04fee6c117357a76a837a1e2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Financial-Times/next-myft-email/pulls/181/commits","review_comments_url":"https://api.github.com/repos/Financial-Times/next-myft-email/pulls/181/comments","review_comment_url":"https://api.github.com/repos/Financial-Times/next-myft-email/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Financial-Times/next-myft-email/issues/181/comments","statuses_url":"https://api.github.com/repos/Financial-Times/next-myft-email/statuses/92a18d988a5438b1181b776dd16c4da11cdbeabd","head":{"label":"Financial-Times:redis-test-break","ref":"redis-test-break","sha":"92a18d988a5438b1181b776dd16c4da11cdbeabd","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":56044938,"name":"next-myft-email","full_name":"Financial-Times/next-myft-email","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/next-myft-email","description":"Collection of services to generate myFT emails","fork":false,"url":"https://api.github.com/repos/Financial-Times/next-myft-email","forks_url":"https://api.github.com/repos/Financial-Times/next-myft-email/forks","keys_url":"https://api.github.com/repos/Financial-Times/next-myft-email/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/next-myft-email/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/next-myft-email/teams","hooks_url":"https://api.github.com/repos/Financial-Times/next-myft-email/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/next-myft-email/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/next-myft-email/events","assignees_url":"https://api.github.com/repos/Financial-Times/next-myft-email/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/next-myft-email/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/next-myft-email/tags","blobs_url":"https://api.github.com/repos/Financial-Times/next-myft-email/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/next-myft-email/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/next-myft-email/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/next-myft-email/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/next-myft-email/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/next-myft-email/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/next-myft-email/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/next-myft-email/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/next-myft-email/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/next-myft-email/subscription","commits_url":"https://api.github.com/repos/Financial-Times/next-myft-email/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/next-myft-email/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/next-myft-email/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/next-myft-email/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/next-myft-email/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/next-myft-email/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/next-myft-email/merges","archive_url":"https://api.github.com/repos/Financial-Times/next-myft-email/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/next-myft-email/downloads","issues_url":"https://api.github.com/repos/Financial-Times/next-myft-email/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/next-myft-email/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/next-myft-email/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/next-myft-email/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/next-myft-email/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/next-myft-email/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/next-myft-email/deployments","created_at":"2016-04-12T08:27:08Z","updated_at":"2016-04-12T15:41:48Z","pushed_at":"2016-06-23T13:17:48Z","git_url":"git://github.com/Financial-Times/next-myft-email.git","ssh_url":"git@github.com:Financial-Times/next-myft-email.git","clone_url":"https://github.com/Financial-Times/next-myft-email.git","svn_url":"https://github.com/Financial-Times/next-myft-email","homepage":"","size":616,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"Financial-Times:master","ref":"master","sha":"80fdad10432c71baae37273359869aa61159aece","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":56044938,"name":"next-myft-email","full_name":"Financial-Times/next-myft-email","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/next-myft-email","description":"Collection of services to generate myFT emails","fork":false,"url":"https://api.github.com/repos/Financial-Times/next-myft-email","forks_url":"https://api.github.com/repos/Financial-Times/next-myft-email/forks","keys_url":"https://api.github.com/repos/Financial-Times/next-myft-email/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/next-myft-email/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/next-myft-email/teams","hooks_url":"https://api.github.com/repos/Financial-Times/next-myft-email/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/next-myft-email/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/next-myft-email/events","assignees_url":"https://api.github.com/repos/Financial-Times/next-myft-email/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/next-myft-email/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/next-myft-email/tags","blobs_url":"https://api.github.com/repos/Financial-Times/next-myft-email/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/next-myft-email/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/next-myft-email/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/next-myft-email/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/next-myft-email/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/next-myft-email/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/next-myft-email/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/next-myft-email/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/next-myft-email/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/next-myft-email/subscription","commits_url":"https://api.github.com/repos/Financial-Times/next-myft-email/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/next-myft-email/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/next-myft-email/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/next-myft-email/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/next-myft-email/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/next-myft-email/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/next-myft-email/merges","archive_url":"https://api.github.com/repos/Financial-Times/next-myft-email/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/next-myft-email/downloads","issues_url":"https://api.github.com/repos/Financial-Times/next-myft-email/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/next-myft-email/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/next-myft-email/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/next-myft-email/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/next-myft-email/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/next-myft-email/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/next-myft-email/deployments","created_at":"2016-04-12T08:27:08Z","updated_at":"2016-04-12T15:41:48Z","pushed_at":"2016-06-23T13:17:48Z","git_url":"git://github.com/Financial-Times/next-myft-email.git","ssh_url":"git@github.com:Financial-Times/next-myft-email.git","clone_url":"https://github.com/Financial-Times/next-myft-email.git","svn_url":"https://github.com/Financial-Times/next-myft-email","homepage":"","size":616,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/next-myft-email/pulls/181"},"html":{"href":"https://github.com/Financial-Times/next-myft-email/pull/181"},"issue":{"href":"https://api.github.com/repos/Financial-Times/next-myft-email/issues/181"},"comments":{"href":"https://api.github.com/repos/Financial-Times/next-myft-email/issues/181/comments"},"review_comments":{"href":"https://api.github.com/repos/Financial-Times/next-myft-email/pulls/181/comments"},"review_comment":{"href":"https://api.github.com/repos/Financial-Times/next-myft-email/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Financial-Times/next-myft-email/pulls/181/commits"},"statuses":{"href":"https://api.github.com/repos/Financial-Times/next-myft-email/statuses/92a18d988a5438b1181b776dd16c4da11cdbeabd"}}}}
{"actor":{"display_login":"keirog"}}