{"action":"created","comment":{"url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/comments/130477296","pull_request_review_id":53357209,"id":130477296,"diff_hunk":"@@ -1125,4 +1125,28 @@\n       expect { appeal.veteran_first_name }.to raise_error(AssociatedVacolsModel::LazyLoadingTurnedOffError)\n     end\n   end\n+\n+  context \"#vbms_id\" do\n+    context \"when vbms_id exists in the caseflow DB\" do\n+      it \"does not make a request to VACOLS\" do\n+        expect(appeal).to receive(:perform_vacols_request)\n+          .exactly(0).times\n+\n+        expect(appeal.attributes[\"vbms_id\"]).to_not be_nil\n+        expect(appeal.vbms_id).to_not be_nil\n+      end\n+    end\n+\n+    context \"when vbms_id is nil\" do\n+      let(:no_vbms_id_appeal) { Appeal.create(vacols_id: appeal.vacols_id) }\n+\n+      it \"looks up vbms_id in VACOLS\" do\n+        expect(no_vbms_id_appeal).to receive(:perform_vacols_request)\n+          .exactly(1).times.and_call_original\n+\n+        expect(no_vbms_id_appeal.attributes[\"vbms_id\"]).to be_nil\n+        expect(no_vbms_id_appeal.vbms_id).to_not be_nil","path":"spec/models/appeal_spec.rb","position":24,"original_position":24,"commit_id":"50f4f8cd9508d183efa0ecbc5d4a280553a06e59","original_commit_id":"50f4f8cd9508d183efa0ecbc5d4a280553a06e59","user":{"login":"shanear","id":1596259,"avatar_url":"https://avatars0.githubusercontent.com/u/1596259?v=4","gravatar_id":"","url":"https://api.github.com/users/shanear","html_url":"https://github.com/shanear","followers_url":"https://api.github.com/users/shanear/followers","following_url":"https://api.github.com/users/shanear/following{/other_user}","gists_url":"https://api.github.com/users/shanear/gists{/gist_id}","starred_url":"https://api.github.com/users/shanear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shanear/subscriptions","organizations_url":"https://api.github.com/users/shanear/orgs","repos_url":"https://api.github.com/users/shanear/repos","events_url":"https://api.github.com/users/shanear/events{/privacy}","received_events_url":"https://api.github.com/users/shanear/received_events","type":"User","site_admin":false},"body":"maybe `reload` here to test that it saves it as well?","created_at":"2017-07-31T22:18:17Z","updated_at":"2017-07-31T22:18:17Z","html_url":"https://github.com/department-of-veterans-affairs/caseflow/pull/2781#discussion_r130477296","pull_request_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/2781","_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/comments/130477296"},"html":{"href":"https://github.com/department-of-veterans-affairs/caseflow/pull/2781#discussion_r130477296"},"pull_request":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/2781"}}},"pull_request":{"url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/2781","id":133322230,"html_url":"https://github.com/department-of-veterans-affairs/caseflow/pull/2781","diff_url":"https://github.com/department-of-veterans-affairs/caseflow/pull/2781.diff","patch_url":"https://github.com/department-of-veterans-affairs/caseflow/pull/2781.patch","issue_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/2781","number":2781,"state":"open","locked":false,"title":"Fetch vbms_id from VACOLS if not cached","user":{"login":"joofsh","id":2256237,"avatar_url":"https://avatars0.githubusercontent.com/u/2256237?v=4","gravatar_id":"","url":"https://api.github.com/users/joofsh","html_url":"https://github.com/joofsh","followers_url":"https://api.github.com/users/joofsh/followers","following_url":"https://api.github.com/users/joofsh/following{/other_user}","gists_url":"https://api.github.com/users/joofsh/gists{/gist_id}","starred_url":"https://api.github.com/users/joofsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joofsh/subscriptions","organizations_url":"https://api.github.com/users/joofsh/orgs","repos_url":"https://api.github.com/users/joofsh/repos","events_url":"https://api.github.com/users/joofsh/events{/privacy}","received_events_url":"https://api.github.com/users/joofsh/received_events","type":"User","site_admin":false},"body":"- For an appeal object that does not yet have a vbms_id, we want to try\n  and fetch it from VACOLS. Once we have the vbms_id saved, we should\nonly reference it from the Caseflow DB","created_at":"2017-07-31T19:49:36Z","updated_at":"2017-07-31T22:18:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"12c176a553d04b0f1f139f89c0ef5f429260c2f9","assignee":{"login":"shanear","id":1596259,"avatar_url":"https://avatars0.githubusercontent.com/u/1596259?v=4","gravatar_id":"","url":"https://api.github.com/users/shanear","html_url":"https://github.com/shanear","followers_url":"https://api.github.com/users/shanear/followers","following_url":"https://api.github.com/users/shanear/following{/other_user}","gists_url":"https://api.github.com/users/shanear/gists{/gist_id}","starred_url":"https://api.github.com/users/shanear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shanear/subscriptions","organizations_url":"https://api.github.com/users/shanear/orgs","repos_url":"https://api.github.com/users/shanear/repos","events_url":"https://api.github.com/users/shanear/events{/privacy}","received_events_url":"https://api.github.com/users/shanear/received_events","type":"User","site_admin":false},"assignees":[{"login":"shanear","id":1596259,"avatar_url":"https://avatars0.githubusercontent.com/u/1596259?v=4","gravatar_id":"","url":"https://api.github.com/users/shanear","html_url":"https://github.com/shanear","followers_url":"https://api.github.com/users/shanear/followers","following_url":"https://api.github.com/users/shanear/following{/other_user}","gists_url":"https://api.github.com/users/shanear/gists{/gist_id}","starred_url":"https://api.github.com/users/shanear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shanear/subscriptions","organizations_url":"https://api.github.com/users/shanear/orgs","repos_url":"https://api.github.com/users/shanear/repos","events_url":"https://api.github.com/users/shanear/events{/privacy}","received_events_url":"https://api.github.com/users/shanear/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/2781/commits","review_comments_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/2781/comments","review_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/2781/comments","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/statuses/50f4f8cd9508d183efa0ecbc5d4a280553a06e59","head":{"label":"department-of-veterans-affairs:jd-issue-2769","ref":"jd-issue-2769","sha":"50f4f8cd9508d183efa0ecbc5d4a280553a06e59","user":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars1.githubusercontent.com/u/5421563?v=4","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"repo":{"id":51449239,"name":"caseflow","full_name":"department-of-veterans-affairs/caseflow","owner":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars1.githubusercontent.com/u/5421563?v=4","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/department-of-veterans-affairs/caseflow","description":"Caseflow is a web application that enables the tracking and processing of appealed claims at the Board of Veterans' Appeals.","fork":false,"url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow","forks_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/forks","keys_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/teams","hooks_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/hooks","issue_events_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/events{/number}","events_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/events","assignees_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/assignees{/user}","branches_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/branches{/branch}","tags_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/tags","blobs_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/statuses/{sha}","languages_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/languages","stargazers_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/stargazers","contributors_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/contributors","subscribers_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/subscribers","subscription_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/subscription","commits_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/contents/{+path}","compare_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/merges","archive_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/downloads","issues_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues{/number}","pulls_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls{/number}","milestones_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/milestones{/number}","notifications_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/labels{/name}","releases_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/releases{/id}","deployments_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/deployments","created_at":"2016-02-10T15:20:50Z","updated_at":"2017-07-25T23:59:32Z","pushed_at":"2017-07-31T22:15:50Z","git_url":"git://github.com/department-of-veterans-affairs/caseflow.git","ssh_url":"git@github.com:department-of-veterans-affairs/caseflow.git","clone_url":"https://github.com/department-of-veterans-affairs/caseflow.git","svn_url":"https://github.com/department-of-veterans-affairs/caseflow","homepage":"","size":32445,"stargazers_count":27,"watchers_count":27,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":419,"forks":17,"open_issues":419,"watchers":27,"default_branch":"master"}},"base":{"label":"department-of-veterans-affairs:master","ref":"master","sha":"a62ef684f6ec3b96917980bb7fb4bd7e803981d1","user":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars1.githubusercontent.com/u/5421563?v=4","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"repo":{"id":51449239,"name":"caseflow","full_name":"department-of-veterans-affairs/caseflow","owner":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars1.githubusercontent.com/u/5421563?v=4","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/department-of-veterans-affairs/caseflow","description":"Caseflow is a web application that enables the tracking and processing of appealed claims at the Board of Veterans' Appeals.","fork":false,"url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow","forks_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/forks","keys_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/teams","hooks_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/hooks","issue_events_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/events{/number}","events_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/events","assignees_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/assignees{/user}","branches_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/branches{/branch}","tags_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/tags","blobs_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/statuses/{sha}","languages_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/languages","stargazers_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/stargazers","contributors_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/contributors","subscribers_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/subscribers","subscription_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/subscription","commits_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/contents/{+path}","compare_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/merges","archive_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/downloads","issues_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues{/number}","pulls_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls{/number}","milestones_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/milestones{/number}","notifications_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/labels{/name}","releases_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/releases{/id}","deployments_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/deployments","created_at":"2016-02-10T15:20:50Z","updated_at":"2017-07-25T23:59:32Z","pushed_at":"2017-07-31T22:15:50Z","git_url":"git://github.com/department-of-veterans-affairs/caseflow.git","ssh_url":"git@github.com:department-of-veterans-affairs/caseflow.git","clone_url":"https://github.com/department-of-veterans-affairs/caseflow.git","svn_url":"https://github.com/department-of-veterans-affairs/caseflow","homepage":"","size":32445,"stargazers_count":27,"watchers_count":27,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":419,"forks":17,"open_issues":419,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/2781"},"html":{"href":"https://github.com/department-of-veterans-affairs/caseflow/pull/2781"},"issue":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/2781"},"comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/2781/comments"},"review_comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/2781/comments"},"review_comment":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/2781/commits"},"statuses":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/statuses/50f4f8cd9508d183efa0ecbc5d4a280553a06e59"}}}}
{"actor":{"display_login":"shanear"}}