{"action":"created","comment":{"url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/pulls/comments/193254734","pull_request_review_id":126177896,"id":193254734,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzI1NDczNA==","diff_hunk":"@@ -0,0 +1,97 @@\n+/* tslint:disable:no-unused-expression */\n+import { createPaymentPlan } from 'common/paymentPlan'\n+import { expect } from 'chai'\n+import * as moment from 'moment'\n+\n+const TOTAL_AMOUNT = 1000\n+\n+describe('PaymentPlan',() => {\n+  describe('getLastPaymentDate', () => {\n+    it('should return the last payment date from given fromDate', () => {\n+      const instalmentAmount = 10\n+      const fromDate = moment('2018-01-01')\n+      const numberOfInstalmentsInWeeks = 200\n+      const expectedLastPaymentDate = fromDate.clone().add(numberOfInstalmentsInWeeks, 'weeks')\n+\n+      const frequencyInWeeks = 2\n+      const paymentPlan = createPaymentPlan(TOTAL_AMOUNT, instalmentAmount, frequencyInWeeks)\n+      const lastPaymentDate = paymentPlan.getLastPaymentDate(fromDate)\n+\n+      expect(lastPaymentDate.isSame(expectedLastPaymentDate)).to.be.true\n+    })\n+  })\n+\n+  describe('getPaymentLength', () => {\n+    it('should return a payment length that has no year showing', () => {\n+      const instalmentAmount = 105\n+      const frequencyInWeeks = 4\n+      const paymentPlan = createPaymentPlan(TOTAL_AMOUNT, instalmentAmount, frequencyInWeeks)\n+      const paymentLength = paymentPlan.getPaymentLength()\n+      expect(paymentLength).to.equal('8 months 3 weeks')\n+    })\n+\n+    it('should return a payment length that has exactly 1 year showing', () => {","path":"src/test/common/paymentPlan.ts","position":33,"original_position":33,"commit_id":"c2186823986f9f4bf44c74dccd1ab387373fd7a7","original_commit_id":"c2186823986f9f4bf44c74dccd1ab387373fd7a7","user":{"login":"geek-soft","id":1724691,"node_id":"MDQ6VXNlcjE3MjQ2OTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1724691?v=4","gravatar_id":"","url":"https://api.github.com/users/geek-soft","html_url":"https://github.com/geek-soft","followers_url":"https://api.github.com/users/geek-soft/followers","following_url":"https://api.github.com/users/geek-soft/following{/other_user}","gists_url":"https://api.github.com/users/geek-soft/gists{/gist_id}","starred_url":"https://api.github.com/users/geek-soft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geek-soft/subscriptions","organizations_url":"https://api.github.com/users/geek-soft/orgs","repos_url":"https://api.github.com/users/geek-soft/repos","events_url":"https://api.github.com/users/geek-soft/events{/privacy}","received_events_url":"https://api.github.com/users/geek-soft/received_events","type":"User","site_admin":false},"body":"After reading `should return a payment length that has exactly 1 year showing` I thought that test will evaluate scenario where result is equal `1 year`","created_at":"2018-06-05T23:42:46Z","updated_at":"2018-06-05T23:56:54Z","html_url":"https://github.com/hmcts/cmc-citizen-frontend/pull/603#discussion_r193254734","pull_request_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/pulls/603","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/pulls/comments/193254734"},"html":{"href":"https://github.com/hmcts/cmc-citizen-frontend/pull/603#discussion_r193254734"},"pull_request":{"href":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/pulls/603"}}},"pull_request":{"url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/pulls/603","id":190105919,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkwMTA1OTE5","html_url":"https://github.com/hmcts/cmc-citizen-frontend/pull/603","diff_url":"https://github.com/hmcts/cmc-citizen-frontend/pull/603.diff","patch_url":"https://github.com/hmcts/cmc-citizen-frontend/pull/603.patch","issue_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/issues/603","number":603,"state":"open","locked":false,"title":"ROC-3657 Full Admission - When will you pay","user":{"login":"varma02","id":12914259,"node_id":"MDQ6VXNlcjEyOTE0MjU5","avatar_url":"https://avatars2.githubusercontent.com/u/12914259?v=4","gravatar_id":"","url":"https://api.github.com/users/varma02","html_url":"https://github.com/varma02","followers_url":"https://api.github.com/users/varma02/followers","following_url":"https://api.github.com/users/varma02/following{/other_user}","gists_url":"https://api.github.com/users/varma02/gists{/gist_id}","starred_url":"https://api.github.com/users/varma02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varma02/subscriptions","organizations_url":"https://api.github.com/users/varma02/orgs","repos_url":"https://api.github.com/users/varma02/repos","events_url":"https://api.github.com/users/varma02/events{/privacy}","received_events_url":"https://api.github.com/users/varma02/received_events","type":"User","site_admin":false},"body":"### JIRA link\r\nhttps://tools.hmcts.net/jira/browse/ROC-3657\r\n\r\n\r\n### Change description\r\nFull Admission - when will you pay\r\n","created_at":"2018-05-23T21:10:02Z","updated_at":"2018-06-05T23:56:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f08f9c09db213fdac3d25c3b36e4af4f465d688","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ckalista","id":138029,"node_id":"MDQ6VXNlcjEzODAyOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/138029?v=4","gravatar_id":"","url":"https://api.github.com/users/ckalista","html_url":"https://github.com/ckalista","followers_url":"https://api.github.com/users/ckalista/followers","following_url":"https://api.github.com/users/ckalista/following{/other_user}","gists_url":"https://api.github.com/users/ckalista/gists{/gist_id}","starred_url":"https://api.github.com/users/ckalista/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckalista/subscriptions","organizations_url":"https://api.github.com/users/ckalista/orgs","repos_url":"https://api.github.com/users/ckalista/repos","events_url":"https://api.github.com/users/ckalista/events{/privacy}","received_events_url":"https://api.github.com/users/ckalista/received_events","type":"User","site_admin":false},{"login":"timja-kainos","id":21194782,"node_id":"MDQ6VXNlcjIxMTk0Nzgy","avatar_url":"https://avatars3.githubusercontent.com/u/21194782?v=4","gravatar_id":"","url":"https://api.github.com/users/timja-kainos","html_url":"https://github.com/timja-kainos","followers_url":"https://api.github.com/users/timja-kainos/followers","following_url":"https://api.github.com/users/timja-kainos/following{/other_user}","gists_url":"https://api.github.com/users/timja-kainos/gists{/gist_id}","starred_url":"https://api.github.com/users/timja-kainos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timja-kainos/subscriptions","organizations_url":"https://api.github.com/users/timja-kainos/orgs","repos_url":"https://api.github.com/users/timja-kainos/repos","events_url":"https://api.github.com/users/timja-kainos/events{/privacy}","received_events_url":"https://api.github.com/users/timja-kainos/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/pulls/603/commits","review_comments_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/pulls/603/comments","review_comment_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/issues/603/comments","statuses_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/statuses/c2186823986f9f4bf44c74dccd1ab387373fd7a7","head":{"label":"hmcts:feature/ROC-3657-FullAdmissionWhenWillYouPay","ref":"feature/ROC-3657-FullAdmissionWhenWillYouPay","sha":"c2186823986f9f4bf44c74dccd1ab387373fd7a7","user":{"login":"hmcts","id":22817111,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODE3MTEx","avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"repo":{"id":100393203,"node_id":"MDEwOlJlcG9zaXRvcnkxMDAzOTMyMDM=","name":"cmc-citizen-frontend","full_name":"hmcts/cmc-citizen-frontend","owner":{"login":"hmcts","id":22817111,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODE3MTEx","avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmcts/cmc-citizen-frontend","description":"Citizen frontend application for Civil Money Claims","fork":false,"url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend","forks_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/forks","keys_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/teams","hooks_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/hooks","issue_events_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/events","assignees_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/tags","blobs_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/languages","stargazers_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/stargazers","contributors_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/contributors","subscribers_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/subscribers","subscription_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/subscription","commits_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/merges","archive_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/downloads","issues_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/labels{/name}","releases_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/deployments","created_at":"2017-08-15T15:44:48Z","updated_at":"2018-06-05T15:23:22Z","pushed_at":"2018-06-05T20:48:36Z","git_url":"git://github.com/hmcts/cmc-citizen-frontend.git","ssh_url":"git@github.com:hmcts/cmc-citizen-frontend.git","clone_url":"https://github.com/hmcts/cmc-citizen-frontend.git","svn_url":"https://github.com/hmcts/cmc-citizen-frontend","homepage":"https://www.gov.uk/make-money-claim","size":4593,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":4,"open_issues":8,"watchers":2,"default_branch":"master"}},"base":{"label":"hmcts:master","ref":"master","sha":"64d88675063ea3f77c4200a7a5242375e6045190","user":{"login":"hmcts","id":22817111,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODE3MTEx","avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"repo":{"id":100393203,"node_id":"MDEwOlJlcG9zaXRvcnkxMDAzOTMyMDM=","name":"cmc-citizen-frontend","full_name":"hmcts/cmc-citizen-frontend","owner":{"login":"hmcts","id":22817111,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODE3MTEx","avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmcts/cmc-citizen-frontend","description":"Citizen frontend application for Civil Money Claims","fork":false,"url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend","forks_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/forks","keys_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/teams","hooks_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/hooks","issue_events_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/events","assignees_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/tags","blobs_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/languages","stargazers_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/stargazers","contributors_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/contributors","subscribers_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/subscribers","subscription_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/subscription","commits_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/merges","archive_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/downloads","issues_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/labels{/name}","releases_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/deployments","created_at":"2017-08-15T15:44:48Z","updated_at":"2018-06-05T15:23:22Z","pushed_at":"2018-06-05T20:48:36Z","git_url":"git://github.com/hmcts/cmc-citizen-frontend.git","ssh_url":"git@github.com:hmcts/cmc-citizen-frontend.git","clone_url":"https://github.com/hmcts/cmc-citizen-frontend.git","svn_url":"https://github.com/hmcts/cmc-citizen-frontend","homepage":"https://www.gov.uk/make-money-claim","size":4593,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":4,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/pulls/603"},"html":{"href":"https://github.com/hmcts/cmc-citizen-frontend/pull/603"},"issue":{"href":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/issues/603"},"comments":{"href":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/issues/603/comments"},"review_comments":{"href":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/pulls/603/comments"},"review_comment":{"href":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/pulls/603/commits"},"statuses":{"href":"https://api.github.com/repos/hmcts/cmc-citizen-frontend/statuses/c2186823986f9f4bf44c74dccd1ab387373fd7a7"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"geek-soft"}}