{"action":"created","comment":{"url":"https://api.github.com/repos/CruGlobal/cap/pulls/comments/26319595","id":26319595,"diff_hunk":"@@ -0,0 +1,68 @@\n+require 'spec_helper'\n+\n+describe ProfilesController do\n+  context '#create' do\n+    it 'should store the application choices in the session as preapp' do\n+      p = create(:person)\n+      session[:person_id] = p.id\n+      xhr :post, :create, sub_ministry_id: 1, ministry_id: 2, position: 'stint'\n+      expect(session[:preapp]).to eq('sub_ministry_id' => '1', 'ministry_id' => '2', 'position' => 'stint')\n+    end\n+  end\n+  context '#update' do\n+    it 'should update the current person object' do\n+      p = create(:person)\n+      root_ministry = create(:ministry, name: 'Root')","path":"spec/controllers/profiles_controller_spec.rb","position":15,"original_position":15,"commit_id":"5a996227686bb54a5e0f8973ca70923dfe18d6d7","original_commit_id":"5a996227686bb54a5e0f8973ca70923dfe18d6d7","user":{"login":"twinge","id":23668,"avatar_url":"https://avatars.githubusercontent.com/u/23668?v=3","gravatar_id":"","url":"https://api.github.com/users/twinge","html_url":"https://github.com/twinge","followers_url":"https://api.github.com/users/twinge/followers","following_url":"https://api.github.com/users/twinge/following{/other_user}","gists_url":"https://api.github.com/users/twinge/gists{/gist_id}","starred_url":"https://api.github.com/users/twinge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twinge/subscriptions","organizations_url":"https://api.github.com/users/twinge/orgs","repos_url":"https://api.github.com/users/twinge/repos","events_url":"https://api.github.com/users/twinge/events{/privacy}","received_events_url":"https://api.github.com/users/twinge/received_events","type":"User","site_admin":false},"body":"This is an example of where you should use `let`. If you move this declaration up to the `context` level using `let`, you won't have it repeated in each of these specs.\r\n\r\nSame is true of `sub_ministry`","created_at":"2015-03-12T16:40:36Z","updated_at":"2015-03-12T16:40:36Z","html_url":"https://github.com/CruGlobal/cap/pull/1#discussion_r26319595","pull_request_url":"https://api.github.com/repos/CruGlobal/cap/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/CruGlobal/cap/pulls/comments/26319595"},"html":{"href":"https://github.com/CruGlobal/cap/pull/1#discussion_r26319595"},"pull_request":{"href":"https://api.github.com/repos/CruGlobal/cap/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/CruGlobal/cap/pulls/1","id":30988515,"html_url":"https://github.com/CruGlobal/cap/pull/1","diff_url":"https://github.com/CruGlobal/cap/pull/1.diff","patch_url":"https://github.com/CruGlobal/cap/pull/1.patch","issue_url":"https://api.github.com/repos/CruGlobal/cap/issues/1","number":1,"state":"open","locked":false,"title":"Omniauth","user":{"login":"andrewroth","id":13490,"avatar_url":"https://avatars.githubusercontent.com/u/13490?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewroth","html_url":"https://github.com/andrewroth","followers_url":"https://api.github.com/users/andrewroth/followers","following_url":"https://api.github.com/users/andrewroth/following{/other_user}","gists_url":"https://api.github.com/users/andrewroth/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewroth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewroth/subscriptions","organizations_url":"https://api.github.com/users/andrewroth/orgs","repos_url":"https://api.github.com/users/andrewroth/repos","events_url":"https://api.github.com/users/andrewroth/events{/privacy}","received_events_url":"https://api.github.com/users/andrewroth/received_events","type":"User","site_admin":false},"body":"@twinge Can you give me any feedback on the code so far?  This should help avoid a huge code review later on.  This is the minimal app I could make with login working. Plus a splash page where you choose the ministry/subministry/position you're applying for, a profile page where you confirm your personal details, and the first page of the actual application.","created_at":"2015-03-11T21:45:01Z","updated_at":"2015-03-12T16:40:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"161277e25b999e62d76b60de831c7a53ca3d93f0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CruGlobal/cap/pulls/1/commits","review_comments_url":"https://api.github.com/repos/CruGlobal/cap/pulls/1/comments","review_comment_url":"https://api.github.com/repos/CruGlobal/cap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CruGlobal/cap/issues/1/comments","statuses_url":"https://api.github.com/repos/CruGlobal/cap/statuses/5a996227686bb54a5e0f8973ca70923dfe18d6d7","head":{"label":"CruGlobal:omniauth","ref":"omniauth","sha":"5a996227686bb54a5e0f8973ca70923dfe18d6d7","user":{"login":"CruGlobal","id":1785912,"avatar_url":"https://avatars.githubusercontent.com/u/1785912?v=3","gravatar_id":"","url":"https://api.github.com/users/CruGlobal","html_url":"https://github.com/CruGlobal","followers_url":"https://api.github.com/users/CruGlobal/followers","following_url":"https://api.github.com/users/CruGlobal/following{/other_user}","gists_url":"https://api.github.com/users/CruGlobal/gists{/gist_id}","starred_url":"https://api.github.com/users/CruGlobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CruGlobal/subscriptions","organizations_url":"https://api.github.com/users/CruGlobal/orgs","repos_url":"https://api.github.com/users/CruGlobal/repos","events_url":"https://api.github.com/users/CruGlobal/events{/privacy}","received_events_url":"https://api.github.com/users/CruGlobal/received_events","type":"Organization","site_admin":false},"repo":{"id":30469289,"name":"cap","full_name":"CruGlobal/cap","owner":{"login":"CruGlobal","id":1785912,"avatar_url":"https://avatars.githubusercontent.com/u/1785912?v=3","gravatar_id":"","url":"https://api.github.com/users/CruGlobal","html_url":"https://github.com/CruGlobal","followers_url":"https://api.github.com/users/CruGlobal/followers","following_url":"https://api.github.com/users/CruGlobal/following{/other_user}","gists_url":"https://api.github.com/users/CruGlobal/gists{/gist_id}","starred_url":"https://api.github.com/users/CruGlobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CruGlobal/subscriptions","organizations_url":"https://api.github.com/users/CruGlobal/orgs","repos_url":"https://api.github.com/users/CruGlobal/repos","events_url":"https://api.github.com/users/CruGlobal/events{/privacy}","received_events_url":"https://api.github.com/users/CruGlobal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CruGlobal/cap","description":"","fork":false,"url":"https://api.github.com/repos/CruGlobal/cap","forks_url":"https://api.github.com/repos/CruGlobal/cap/forks","keys_url":"https://api.github.com/repos/CruGlobal/cap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CruGlobal/cap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CruGlobal/cap/teams","hooks_url":"https://api.github.com/repos/CruGlobal/cap/hooks","issue_events_url":"https://api.github.com/repos/CruGlobal/cap/issues/events{/number}","events_url":"https://api.github.com/repos/CruGlobal/cap/events","assignees_url":"https://api.github.com/repos/CruGlobal/cap/assignees{/user}","branches_url":"https://api.github.com/repos/CruGlobal/cap/branches{/branch}","tags_url":"https://api.github.com/repos/CruGlobal/cap/tags","blobs_url":"https://api.github.com/repos/CruGlobal/cap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CruGlobal/cap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CruGlobal/cap/git/refs{/sha}","trees_url":"https://api.github.com/repos/CruGlobal/cap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CruGlobal/cap/statuses/{sha}","languages_url":"https://api.github.com/repos/CruGlobal/cap/languages","stargazers_url":"https://api.github.com/repos/CruGlobal/cap/stargazers","contributors_url":"https://api.github.com/repos/CruGlobal/cap/contributors","subscribers_url":"https://api.github.com/repos/CruGlobal/cap/subscribers","subscription_url":"https://api.github.com/repos/CruGlobal/cap/subscription","commits_url":"https://api.github.com/repos/CruGlobal/cap/commits{/sha}","git_commits_url":"https://api.github.com/repos/CruGlobal/cap/git/commits{/sha}","comments_url":"https://api.github.com/repos/CruGlobal/cap/comments{/number}","issue_comment_url":"https://api.github.com/repos/CruGlobal/cap/issues/comments{/number}","contents_url":"https://api.github.com/repos/CruGlobal/cap/contents/{+path}","compare_url":"https://api.github.com/repos/CruGlobal/cap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CruGlobal/cap/merges","archive_url":"https://api.github.com/repos/CruGlobal/cap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CruGlobal/cap/downloads","issues_url":"https://api.github.com/repos/CruGlobal/cap/issues{/number}","pulls_url":"https://api.github.com/repos/CruGlobal/cap/pulls{/number}","milestones_url":"https://api.github.com/repos/CruGlobal/cap/milestones{/number}","notifications_url":"https://api.github.com/repos/CruGlobal/cap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CruGlobal/cap/labels{/name}","releases_url":"https://api.github.com/repos/CruGlobal/cap/releases{/id}","created_at":"2015-02-07T20:34:48Z","updated_at":"2015-02-24T04:46:15Z","pushed_at":"2015-03-12T02:49:51Z","git_url":"git://github.com/CruGlobal/cap.git","ssh_url":"git@github.com:CruGlobal/cap.git","clone_url":"https://github.com/CruGlobal/cap.git","svn_url":"https://github.com/CruGlobal/cap","homepage":null,"size":6064,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"CruGlobal:dev","ref":"dev","sha":"3614f77f87f5f0c33996214cb68f0cd4e785ebd4","user":{"login":"CruGlobal","id":1785912,"avatar_url":"https://avatars.githubusercontent.com/u/1785912?v=3","gravatar_id":"","url":"https://api.github.com/users/CruGlobal","html_url":"https://github.com/CruGlobal","followers_url":"https://api.github.com/users/CruGlobal/followers","following_url":"https://api.github.com/users/CruGlobal/following{/other_user}","gists_url":"https://api.github.com/users/CruGlobal/gists{/gist_id}","starred_url":"https://api.github.com/users/CruGlobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CruGlobal/subscriptions","organizations_url":"https://api.github.com/users/CruGlobal/orgs","repos_url":"https://api.github.com/users/CruGlobal/repos","events_url":"https://api.github.com/users/CruGlobal/events{/privacy}","received_events_url":"https://api.github.com/users/CruGlobal/received_events","type":"Organization","site_admin":false},"repo":{"id":30469289,"name":"cap","full_name":"CruGlobal/cap","owner":{"login":"CruGlobal","id":1785912,"avatar_url":"https://avatars.githubusercontent.com/u/1785912?v=3","gravatar_id":"","url":"https://api.github.com/users/CruGlobal","html_url":"https://github.com/CruGlobal","followers_url":"https://api.github.com/users/CruGlobal/followers","following_url":"https://api.github.com/users/CruGlobal/following{/other_user}","gists_url":"https://api.github.com/users/CruGlobal/gists{/gist_id}","starred_url":"https://api.github.com/users/CruGlobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CruGlobal/subscriptions","organizations_url":"https://api.github.com/users/CruGlobal/orgs","repos_url":"https://api.github.com/users/CruGlobal/repos","events_url":"https://api.github.com/users/CruGlobal/events{/privacy}","received_events_url":"https://api.github.com/users/CruGlobal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CruGlobal/cap","description":"","fork":false,"url":"https://api.github.com/repos/CruGlobal/cap","forks_url":"https://api.github.com/repos/CruGlobal/cap/forks","keys_url":"https://api.github.com/repos/CruGlobal/cap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CruGlobal/cap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CruGlobal/cap/teams","hooks_url":"https://api.github.com/repos/CruGlobal/cap/hooks","issue_events_url":"https://api.github.com/repos/CruGlobal/cap/issues/events{/number}","events_url":"https://api.github.com/repos/CruGlobal/cap/events","assignees_url":"https://api.github.com/repos/CruGlobal/cap/assignees{/user}","branches_url":"https://api.github.com/repos/CruGlobal/cap/branches{/branch}","tags_url":"https://api.github.com/repos/CruGlobal/cap/tags","blobs_url":"https://api.github.com/repos/CruGlobal/cap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CruGlobal/cap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CruGlobal/cap/git/refs{/sha}","trees_url":"https://api.github.com/repos/CruGlobal/cap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CruGlobal/cap/statuses/{sha}","languages_url":"https://api.github.com/repos/CruGlobal/cap/languages","stargazers_url":"https://api.github.com/repos/CruGlobal/cap/stargazers","contributors_url":"https://api.github.com/repos/CruGlobal/cap/contributors","subscribers_url":"https://api.github.com/repos/CruGlobal/cap/subscribers","subscription_url":"https://api.github.com/repos/CruGlobal/cap/subscription","commits_url":"https://api.github.com/repos/CruGlobal/cap/commits{/sha}","git_commits_url":"https://api.github.com/repos/CruGlobal/cap/git/commits{/sha}","comments_url":"https://api.github.com/repos/CruGlobal/cap/comments{/number}","issue_comment_url":"https://api.github.com/repos/CruGlobal/cap/issues/comments{/number}","contents_url":"https://api.github.com/repos/CruGlobal/cap/contents/{+path}","compare_url":"https://api.github.com/repos/CruGlobal/cap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CruGlobal/cap/merges","archive_url":"https://api.github.com/repos/CruGlobal/cap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CruGlobal/cap/downloads","issues_url":"https://api.github.com/repos/CruGlobal/cap/issues{/number}","pulls_url":"https://api.github.com/repos/CruGlobal/cap/pulls{/number}","milestones_url":"https://api.github.com/repos/CruGlobal/cap/milestones{/number}","notifications_url":"https://api.github.com/repos/CruGlobal/cap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CruGlobal/cap/labels{/name}","releases_url":"https://api.github.com/repos/CruGlobal/cap/releases{/id}","created_at":"2015-02-07T20:34:48Z","updated_at":"2015-02-24T04:46:15Z","pushed_at":"2015-03-12T02:49:51Z","git_url":"git://github.com/CruGlobal/cap.git","ssh_url":"git@github.com:CruGlobal/cap.git","clone_url":"https://github.com/CruGlobal/cap.git","svn_url":"https://github.com/CruGlobal/cap","homepage":null,"size":6064,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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/CruGlobal/cap/pulls/1"},"html":{"href":"https://github.com/CruGlobal/cap/pull/1"},"issue":{"href":"https://api.github.com/repos/CruGlobal/cap/issues/1"},"comments":{"href":"https://api.github.com/repos/CruGlobal/cap/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/CruGlobal/cap/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/CruGlobal/cap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CruGlobal/cap/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/CruGlobal/cap/statuses/5a996227686bb54a5e0f8973ca70923dfe18d6d7"}}}}