{"action":"created","comment":{"url":"https://api.github.com/repos/sul-dlss/item-release/pulls/comments/56424914","id":56424914,"diff_hunk":"@@ -402,6 +420,29 @@\n     end\n   end\n \n+  describe 'dor_items_for_constituents' do\n+    it 'should return empty array if no datastreams' do\n+      item = double('item', id: '12345', datastreams: nil)\n+      expect(Dor::UpdateMarcRecordService.new(item).send(:dor_items_for_constituents)).to eq([])\n+    end\n+    it 'should return empty array if no RELS-EXT datastreams' do\n+      item = double('item', id: '12345', datastreams: {})\n+      expect(Dor::UpdateMarcRecordService.new(item).send(:dor_items_for_constituents)).to eq([])\n+    end\n+    it 'should return empty array if no RELS-EXT ng_xml' do\n+      item = double('item', id: '12345', datastreams: {'RELS-EXT' => double('xml', ng_xml: nil)})\n+      expect(Dor::UpdateMarcRecordService.new(item).send(:dor_items_for_constituents)).to eq([])\n+    end\n+    it 'successfully determines constituent druid' do\n+      rels_ext_xml = double(String, ng_xml: Nokogiri::XML(build_rels_ext))\n+\n+      item = double('item', id: '12345', datastreams: {'RELS-EXT' => rels_ext_xml})","path":"spec/lib/dor/update_marc_record_service_spec.rb","position":116,"original_position":116,"commit_id":"27590e2b5b28c7342939ee6dc4974d3bb59643e3","original_commit_id":"27590e2b5b28c7342939ee6dc4974d3bb59643e3","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Space inside { missing.<br>Space inside } missing.","created_at":"2016-03-16T22:10:41Z","updated_at":"2016-03-16T22:10:41Z","html_url":"https://github.com/sul-dlss/item-release/pull/51#discussion_r56424914","pull_request_url":"https://api.github.com/repos/sul-dlss/item-release/pulls/51","_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/item-release/pulls/comments/56424914"},"html":{"href":"https://github.com/sul-dlss/item-release/pull/51#discussion_r56424914"},"pull_request":{"href":"https://api.github.com/repos/sul-dlss/item-release/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/sul-dlss/item-release/pulls/51","id":63144337,"html_url":"https://github.com/sul-dlss/item-release/pull/51","diff_url":"https://github.com/sul-dlss/item-release/pull/51.diff","patch_url":"https://github.com/sul-dlss/item-release/pull/51.patch","issue_url":"https://api.github.com/repos/sul-dlss/item-release/issues/51","number":51,"state":"open","locked":false,"title":"Update to add constituent data into 856","user":{"login":"lmcglohon","id":3585151,"avatar_url":"https://avatars.githubusercontent.com/u/3585151?v=3","gravatar_id":"","url":"https://api.github.com/users/lmcglohon","html_url":"https://github.com/lmcglohon","followers_url":"https://api.github.com/users/lmcglohon/followers","following_url":"https://api.github.com/users/lmcglohon/following{/other_user}","gists_url":"https://api.github.com/users/lmcglohon/gists{/gist_id}","starred_url":"https://api.github.com/users/lmcglohon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmcglohon/subscriptions","organizations_url":"https://api.github.com/users/lmcglohon/orgs","repos_url":"https://api.github.com/users/lmcglohon/repos","events_url":"https://api.github.com/users/lmcglohon/events{/privacy}","received_events_url":"https://api.github.com/users/lmcglohon/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-16T22:10:36Z","updated_at":"2016-03-16T22:10:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sul-dlss/item-release/pulls/51/commits","review_comments_url":"https://api.github.com/repos/sul-dlss/item-release/pulls/51/comments","review_comment_url":"https://api.github.com/repos/sul-dlss/item-release/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sul-dlss/item-release/issues/51/comments","statuses_url":"https://api.github.com/repos/sul-dlss/item-release/statuses/27590e2b5b28c7342939ee6dc4974d3bb59643e3","head":{"label":"sul-dlss:add_constituent_data","ref":"add_constituent_data","sha":"27590e2b5b28c7342939ee6dc4974d3bb59643e3","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":27557505,"name":"item-release","full_name":"sul-dlss/item-release","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/item-release","description":"Robot suite that handles item release and updating PURLs to prepare for indexing.","fork":false,"url":"https://api.github.com/repos/sul-dlss/item-release","forks_url":"https://api.github.com/repos/sul-dlss/item-release/forks","keys_url":"https://api.github.com/repos/sul-dlss/item-release/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/item-release/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/item-release/teams","hooks_url":"https://api.github.com/repos/sul-dlss/item-release/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/item-release/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/item-release/events","assignees_url":"https://api.github.com/repos/sul-dlss/item-release/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/item-release/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/item-release/tags","blobs_url":"https://api.github.com/repos/sul-dlss/item-release/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/item-release/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/item-release/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/item-release/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/item-release/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/item-release/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/item-release/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/item-release/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/item-release/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/item-release/subscription","commits_url":"https://api.github.com/repos/sul-dlss/item-release/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/item-release/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/item-release/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/item-release/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/item-release/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/item-release/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/item-release/merges","archive_url":"https://api.github.com/repos/sul-dlss/item-release/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/item-release/downloads","issues_url":"https://api.github.com/repos/sul-dlss/item-release/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/item-release/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/item-release/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/item-release/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/item-release/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/item-release/releases{/id}","deployments_url":"https://api.github.com/repos/sul-dlss/item-release/deployments","created_at":"2014-12-04T19:59:14Z","updated_at":"2016-01-22T02:56:08Z","pushed_at":"2016-03-16T22:10:36Z","git_url":"git://github.com/sul-dlss/item-release.git","ssh_url":"git@github.com:sul-dlss/item-release.git","clone_url":"https://github.com/sul-dlss/item-release.git","svn_url":"https://github.com/sul-dlss/item-release","homepage":null,"size":129,"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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"sul-dlss:master","ref":"master","sha":"998a1dbf22d1206996ba7e33d1e1d47e8bf1b17f","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":27557505,"name":"item-release","full_name":"sul-dlss/item-release","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/item-release","description":"Robot suite that handles item release and updating PURLs to prepare for indexing.","fork":false,"url":"https://api.github.com/repos/sul-dlss/item-release","forks_url":"https://api.github.com/repos/sul-dlss/item-release/forks","keys_url":"https://api.github.com/repos/sul-dlss/item-release/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/item-release/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/item-release/teams","hooks_url":"https://api.github.com/repos/sul-dlss/item-release/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/item-release/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/item-release/events","assignees_url":"https://api.github.com/repos/sul-dlss/item-release/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/item-release/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/item-release/tags","blobs_url":"https://api.github.com/repos/sul-dlss/item-release/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/item-release/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/item-release/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/item-release/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/item-release/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/item-release/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/item-release/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/item-release/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/item-release/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/item-release/subscription","commits_url":"https://api.github.com/repos/sul-dlss/item-release/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/item-release/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/item-release/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/item-release/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/item-release/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/item-release/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/item-release/merges","archive_url":"https://api.github.com/repos/sul-dlss/item-release/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/item-release/downloads","issues_url":"https://api.github.com/repos/sul-dlss/item-release/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/item-release/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/item-release/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/item-release/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/item-release/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/item-release/releases{/id}","deployments_url":"https://api.github.com/repos/sul-dlss/item-release/deployments","created_at":"2014-12-04T19:59:14Z","updated_at":"2016-01-22T02:56:08Z","pushed_at":"2016-03-16T22:10:36Z","git_url":"git://github.com/sul-dlss/item-release.git","ssh_url":"git@github.com:sul-dlss/item-release.git","clone_url":"https://github.com/sul-dlss/item-release.git","svn_url":"https://github.com/sul-dlss/item-release","homepage":null,"size":129,"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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/item-release/pulls/51"},"html":{"href":"https://github.com/sul-dlss/item-release/pull/51"},"issue":{"href":"https://api.github.com/repos/sul-dlss/item-release/issues/51"},"comments":{"href":"https://api.github.com/repos/sul-dlss/item-release/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/sul-dlss/item-release/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/sul-dlss/item-release/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sul-dlss/item-release/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/sul-dlss/item-release/statuses/27590e2b5b28c7342939ee6dc4974d3bb59643e3"}}}}