{"action":"created","comment":{"url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/pulls/comments/69707374","id":69707374,"diff_hunk":"@@ -41,6 +42,48 @@ describe('lib/base-controller', () => {\n       });\n     });\n \n+    describe('.get()', () => {\n+      const req = {};\n+      const res = {\n+        locals: {\n+          partials: {\n+            step: 'default-template'\n+          }\n+        }\n+      };\n+\n+      beforeEach(() => {\n+        res.render = sinon.stub();\n+        hmpoFormWizard.Controller.prototype.get = sinon.stub();\n+        controller = new Controller({\n+          template: 'foo'\n+        });\n+      });\n+\n+      it('calls super', () => {\n+        controller.get(req, res, _.noop);\n+        hmpoFormWizard.Controller.prototype.get.should.have.been.calledOnce\n+          .and.calledWithExactly(req, res, _.noop);\n+      });\n+\n+      it('calls res.render with the template', () => {\n+        controller.get(req, res, _.noop);\n+        res.render.should.have.been.calledOnce;\n+      });\n+\n+      it('sets template to res.locals.partials.step if view lookup error', () => {\n+        res.render = (template, cb) => {\n+          const err = {\n+            message: 'Failed to lookup view'\n+          };\n+          cb(err);","path":"test/lib/base-controller.js","position":45,"original_position":45,"commit_id":"06e4b88e99c102c0b90af486c432d8769f704016","original_commit_id":"06e4b88e99c102c0b90af486c432d8769f704016","user":{"login":"danielepolencic","id":1130499,"avatar_url":"https://avatars.githubusercontent.com/u/1130499?v=3","gravatar_id":"","url":"https://api.github.com/users/danielepolencic","html_url":"https://github.com/danielepolencic","followers_url":"https://api.github.com/users/danielepolencic/followers","following_url":"https://api.github.com/users/danielepolencic/following{/other_user}","gists_url":"https://api.github.com/users/danielepolencic/gists{/gist_id}","starred_url":"https://api.github.com/users/danielepolencic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielepolencic/subscriptions","organizations_url":"https://api.github.com/users/danielepolencic/orgs","repos_url":"https://api.github.com/users/danielepolencic/repos","events_url":"https://api.github.com/users/danielepolencic/events{/privacy}","received_events_url":"https://api.github.com/users/danielepolencic/received_events","type":"User","site_admin":false},"body":"I'm not 100% sure, but the callback receives an instance of `Error`? If so, this should be `cb(new Error('Failed to lookup view'))`","created_at":"2016-07-06T10:25:54Z","updated_at":"2016-07-06T10:25:54Z","html_url":"https://github.com/UKHomeOffice/hof-controllers/pull/69#discussion_r69707374","pull_request_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/pulls/69","_links":{"self":{"href":"https://api.github.com/repos/UKHomeOffice/hof-controllers/pulls/comments/69707374"},"html":{"href":"https://github.com/UKHomeOffice/hof-controllers/pull/69#discussion_r69707374"},"pull_request":{"href":"https://api.github.com/repos/UKHomeOffice/hof-controllers/pulls/69"}}},"pull_request":{"url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/pulls/69","id":76407155,"html_url":"https://github.com/UKHomeOffice/hof-controllers/pull/69","diff_url":"https://github.com/UKHomeOffice/hof-controllers/pull/69.diff","patch_url":"https://github.com/UKHomeOffice/hof-controllers/pull/69.patch","issue_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/issues/69","number":69,"state":"open","locked":false,"title":"closes #68 - use default template if options.template doesn't exist","user":{"login":"joefitter","id":3604142,"avatar_url":"https://avatars.githubusercontent.com/u/3604142?v=3","gravatar_id":"","url":"https://api.github.com/users/joefitter","html_url":"https://github.com/joefitter","followers_url":"https://api.github.com/users/joefitter/followers","following_url":"https://api.github.com/users/joefitter/following{/other_user}","gists_url":"https://api.github.com/users/joefitter/gists{/gist_id}","starred_url":"https://api.github.com/users/joefitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joefitter/subscriptions","organizations_url":"https://api.github.com/users/joefitter/orgs","repos_url":"https://api.github.com/users/joefitter/repos","events_url":"https://api.github.com/users/joefitter/events{/privacy}","received_events_url":"https://api.github.com/users/joefitter/received_events","type":"User","site_admin":false},"body":"* Try looking up template, if fails with lookup error, use res.locals.partials.step\r\n\r\nIn many cases a step will consist of rendering all fields and meta with a continue button - a default partial 'step.html' has been added to hof-template-partials and this change causes the default to be rendered if the given template cant be found (no template supplied, no template with same name as step exists)","created_at":"2016-07-06T10:01:52Z","updated_at":"2016-07-06T10:25:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c97323c7c706ae3af3eba0719f9bc468c7f8944","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/pulls/69/commits","review_comments_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/pulls/69/comments","review_comment_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/issues/69/comments","statuses_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/statuses/06e4b88e99c102c0b90af486c432d8769f704016","head":{"label":"UKHomeOffice:enhancement/use-default-template","ref":"enhancement/use-default-template","sha":"06e4b88e99c102c0b90af486c432d8769f704016","user":{"login":"UKHomeOffice","id":3778081,"avatar_url":"https://avatars.githubusercontent.com/u/3778081?v=3","gravatar_id":"","url":"https://api.github.com/users/UKHomeOffice","html_url":"https://github.com/UKHomeOffice","followers_url":"https://api.github.com/users/UKHomeOffice/followers","following_url":"https://api.github.com/users/UKHomeOffice/following{/other_user}","gists_url":"https://api.github.com/users/UKHomeOffice/gists{/gist_id}","starred_url":"https://api.github.com/users/UKHomeOffice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UKHomeOffice/subscriptions","organizations_url":"https://api.github.com/users/UKHomeOffice/orgs","repos_url":"https://api.github.com/users/UKHomeOffice/repos","events_url":"https://api.github.com/users/UKHomeOffice/events{/privacy}","received_events_url":"https://api.github.com/users/UKHomeOffice/received_events","type":"Organization","site_admin":false},"repo":{"id":45553140,"name":"hof-controllers","full_name":"UKHomeOffice/hof-controllers","owner":{"login":"UKHomeOffice","id":3778081,"avatar_url":"https://avatars.githubusercontent.com/u/3778081?v=3","gravatar_id":"","url":"https://api.github.com/users/UKHomeOffice","html_url":"https://github.com/UKHomeOffice","followers_url":"https://api.github.com/users/UKHomeOffice/followers","following_url":"https://api.github.com/users/UKHomeOffice/following{/other_user}","gists_url":"https://api.github.com/users/UKHomeOffice/gists{/gist_id}","starred_url":"https://api.github.com/users/UKHomeOffice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UKHomeOffice/subscriptions","organizations_url":"https://api.github.com/users/UKHomeOffice/orgs","repos_url":"https://api.github.com/users/UKHomeOffice/repos","events_url":"https://api.github.com/users/UKHomeOffice/events{/privacy}","received_events_url":"https://api.github.com/users/UKHomeOffice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UKHomeOffice/hof-controllers","description":"A collection of controllers commonly used in HOF","fork":false,"url":"https://api.github.com/repos/UKHomeOffice/hof-controllers","forks_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/forks","keys_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/teams","hooks_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/hooks","issue_events_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/issues/events{/number}","events_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/events","assignees_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/assignees{/user}","branches_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/branches{/branch}","tags_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/tags","blobs_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/git/refs{/sha}","trees_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/statuses/{sha}","languages_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/languages","stargazers_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/stargazers","contributors_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/contributors","subscribers_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/subscribers","subscription_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/subscription","commits_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/commits{/sha}","git_commits_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/git/commits{/sha}","comments_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/comments{/number}","issue_comment_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/issues/comments{/number}","contents_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/contents/{+path}","compare_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/merges","archive_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/downloads","issues_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/issues{/number}","pulls_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/pulls{/number}","milestones_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/milestones{/number}","notifications_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/labels{/name}","releases_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/releases{/id}","deployments_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/deployments","created_at":"2015-11-04T16:48:58Z","updated_at":"2016-07-01T17:37:37Z","pushed_at":"2016-07-06T10:01:53Z","git_url":"git://github.com/UKHomeOffice/hof-controllers.git","ssh_url":"git@github.com:UKHomeOffice/hof-controllers.git","clone_url":"https://github.com/UKHomeOffice/hof-controllers.git","svn_url":"https://github.com/UKHomeOffice/hof-controllers","homepage":null,"size":125,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":16,"forks":3,"open_issues":16,"watchers":1,"default_branch":"master"}},"base":{"label":"UKHomeOffice:master","ref":"master","sha":"8f42026cd1d6314bb046205fde5999f2de562f83","user":{"login":"UKHomeOffice","id":3778081,"avatar_url":"https://avatars.githubusercontent.com/u/3778081?v=3","gravatar_id":"","url":"https://api.github.com/users/UKHomeOffice","html_url":"https://github.com/UKHomeOffice","followers_url":"https://api.github.com/users/UKHomeOffice/followers","following_url":"https://api.github.com/users/UKHomeOffice/following{/other_user}","gists_url":"https://api.github.com/users/UKHomeOffice/gists{/gist_id}","starred_url":"https://api.github.com/users/UKHomeOffice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UKHomeOffice/subscriptions","organizations_url":"https://api.github.com/users/UKHomeOffice/orgs","repos_url":"https://api.github.com/users/UKHomeOffice/repos","events_url":"https://api.github.com/users/UKHomeOffice/events{/privacy}","received_events_url":"https://api.github.com/users/UKHomeOffice/received_events","type":"Organization","site_admin":false},"repo":{"id":45553140,"name":"hof-controllers","full_name":"UKHomeOffice/hof-controllers","owner":{"login":"UKHomeOffice","id":3778081,"avatar_url":"https://avatars.githubusercontent.com/u/3778081?v=3","gravatar_id":"","url":"https://api.github.com/users/UKHomeOffice","html_url":"https://github.com/UKHomeOffice","followers_url":"https://api.github.com/users/UKHomeOffice/followers","following_url":"https://api.github.com/users/UKHomeOffice/following{/other_user}","gists_url":"https://api.github.com/users/UKHomeOffice/gists{/gist_id}","starred_url":"https://api.github.com/users/UKHomeOffice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UKHomeOffice/subscriptions","organizations_url":"https://api.github.com/users/UKHomeOffice/orgs","repos_url":"https://api.github.com/users/UKHomeOffice/repos","events_url":"https://api.github.com/users/UKHomeOffice/events{/privacy}","received_events_url":"https://api.github.com/users/UKHomeOffice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UKHomeOffice/hof-controllers","description":"A collection of controllers commonly used in HOF","fork":false,"url":"https://api.github.com/repos/UKHomeOffice/hof-controllers","forks_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/forks","keys_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/teams","hooks_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/hooks","issue_events_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/issues/events{/number}","events_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/events","assignees_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/assignees{/user}","branches_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/branches{/branch}","tags_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/tags","blobs_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/git/refs{/sha}","trees_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/statuses/{sha}","languages_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/languages","stargazers_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/stargazers","contributors_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/contributors","subscribers_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/subscribers","subscription_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/subscription","commits_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/commits{/sha}","git_commits_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/git/commits{/sha}","comments_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/comments{/number}","issue_comment_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/issues/comments{/number}","contents_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/contents/{+path}","compare_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/merges","archive_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/downloads","issues_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/issues{/number}","pulls_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/pulls{/number}","milestones_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/milestones{/number}","notifications_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/labels{/name}","releases_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/releases{/id}","deployments_url":"https://api.github.com/repos/UKHomeOffice/hof-controllers/deployments","created_at":"2015-11-04T16:48:58Z","updated_at":"2016-07-01T17:37:37Z","pushed_at":"2016-07-06T10:01:53Z","git_url":"git://github.com/UKHomeOffice/hof-controllers.git","ssh_url":"git@github.com:UKHomeOffice/hof-controllers.git","clone_url":"https://github.com/UKHomeOffice/hof-controllers.git","svn_url":"https://github.com/UKHomeOffice/hof-controllers","homepage":null,"size":125,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":16,"forks":3,"open_issues":16,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/UKHomeOffice/hof-controllers/pulls/69"},"html":{"href":"https://github.com/UKHomeOffice/hof-controllers/pull/69"},"issue":{"href":"https://api.github.com/repos/UKHomeOffice/hof-controllers/issues/69"},"comments":{"href":"https://api.github.com/repos/UKHomeOffice/hof-controllers/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/UKHomeOffice/hof-controllers/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/UKHomeOffice/hof-controllers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/UKHomeOffice/hof-controllers/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/UKHomeOffice/hof-controllers/statuses/06e4b88e99c102c0b90af486c432d8769f704016"}}}}
{"actor":{"display_login":"danielepolencic"}}