{"action":"created","comment":{"url":"https://api.github.com/repos/Katello/katello/pulls/comments/31982402","id":31982402,"diff_hunk":"@@ -142,6 +143,20 @@ def test_index_with_content_view_version_id\n       assert_template 'api/v2/repositories/index'\n     end\n \n+    def test_index_with_content_view_version_id_and_library\n+      ids = @view.versions.first.repositories.pluck(:library_instance_id).reject(&:blank?)\n+\n+      @controller\n+      .expects(:item_search)\n+      .with(anything, anything, has_entry(:filters => [{:terms => {:id => ids}}]))\n+      .returns({})\n+\n+      get :index, :content_view_version_id => @view.versions.first.id, :organization_id => @organization.id, :library => true\n+\n+      assert_response :success\n+      assert_template 'api/v2/repositories/index'\n+    end\n+","path":"test/controllers/api/v2/repositories_controller_test.rb","position":25,"original_position":25,"commit_id":"9f2d8dca76e6c12d11b22cafe55218e75c0c1eb0","original_commit_id":"9f2d8dca76e6c12d11b22cafe55218e75c0c1eb0","user":{"login":"waldenraines","id":4116405,"avatar_url":"https://avatars.githubusercontent.com/u/4116405?v=3","gravatar_id":"","url":"https://api.github.com/users/waldenraines","html_url":"https://github.com/waldenraines","followers_url":"https://api.github.com/users/waldenraines/followers","following_url":"https://api.github.com/users/waldenraines/following{/other_user}","gists_url":"https://api.github.com/users/waldenraines/gists{/gist_id}","starred_url":"https://api.github.com/users/waldenraines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waldenraines/subscriptions","organizations_url":"https://api.github.com/users/waldenraines/orgs","repos_url":"https://api.github.com/users/waldenraines/repos","events_url":"https://api.github.com/users/waldenraines/events{/privacy}","received_events_url":"https://api.github.com/users/waldenraines/received_events","type":"User","site_admin":false},"body":"I can't get this test to pass, please let me know if you can spot what's wrong.","created_at":"2015-06-09T04:43:13Z","updated_at":"2015-06-09T04:43:13Z","html_url":"https://github.com/Katello/katello/pull/5275#discussion_r31982402","pull_request_url":"https://api.github.com/repos/Katello/katello/pulls/5275","_links":{"self":{"href":"https://api.github.com/repos/Katello/katello/pulls/comments/31982402"},"html":{"href":"https://github.com/Katello/katello/pull/5275#discussion_r31982402"},"pull_request":{"href":"https://api.github.com/repos/Katello/katello/pulls/5275"}}},"pull_request":{"url":"https://api.github.com/repos/Katello/katello/pulls/5275","id":37038096,"html_url":"https://github.com/Katello/katello/pull/5275","diff_url":"https://github.com/Katello/katello/pull/5275.diff","patch_url":"https://github.com/Katello/katello/pull/5275.patch","issue_url":"https://api.github.com/repos/Katello/katello/issues/5275","number":5275,"state":"open","locked":false,"title":"Fixes #10640: only show one repo per CVV BZ 1223699.","user":{"login":"waldenraines","id":4116405,"avatar_url":"https://avatars.githubusercontent.com/u/4116405?v=3","gravatar_id":"","url":"https://api.github.com/users/waldenraines","html_url":"https://github.com/waldenraines","followers_url":"https://api.github.com/users/waldenraines/followers","following_url":"https://api.github.com/users/waldenraines/following{/other_user}","gists_url":"https://api.github.com/users/waldenraines/gists{/gist_id}","starred_url":"https://api.github.com/users/waldenraines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waldenraines/subscriptions","organizations_url":"https://api.github.com/users/waldenraines/orgs","repos_url":"https://api.github.com/users/waldenraines/repos","events_url":"https://api.github.com/users/waldenraines/events{/privacy}","received_events_url":"https://api.github.com/users/waldenraines/received_events","type":"User","site_admin":false},"body":"We were showing multiple repositories per CV based on\r\nthe number of environments.  This commit fixes the display\r\nto only show the library version of the repository.\r\n\r\nhttp://projects.theforeman.org/issues/10640\r\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1223699","created_at":"2015-06-05T14:46:23Z","updated_at":"2015-06-09T04:43:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dcaaaeb89cd26ac16b2b045a670722811e6b7c27","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Katello/katello/pulls/5275/commits","review_comments_url":"https://api.github.com/repos/Katello/katello/pulls/5275/comments","review_comment_url":"https://api.github.com/repos/Katello/katello/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Katello/katello/issues/5275/comments","statuses_url":"https://api.github.com/repos/Katello/katello/statuses/9f2d8dca76e6c12d11b22cafe55218e75c0c1eb0","head":{"label":"waldenraines:10640","ref":"10640","sha":"9f2d8dca76e6c12d11b22cafe55218e75c0c1eb0","user":{"login":"waldenraines","id":4116405,"avatar_url":"https://avatars.githubusercontent.com/u/4116405?v=3","gravatar_id":"","url":"https://api.github.com/users/waldenraines","html_url":"https://github.com/waldenraines","followers_url":"https://api.github.com/users/waldenraines/followers","following_url":"https://api.github.com/users/waldenraines/following{/other_user}","gists_url":"https://api.github.com/users/waldenraines/gists{/gist_id}","starred_url":"https://api.github.com/users/waldenraines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waldenraines/subscriptions","organizations_url":"https://api.github.com/users/waldenraines/orgs","repos_url":"https://api.github.com/users/waldenraines/repos","events_url":"https://api.github.com/users/waldenraines/events{/privacy}","received_events_url":"https://api.github.com/users/waldenraines/received_events","type":"User","site_admin":false},"repo":{"id":9356709,"name":"katello","full_name":"waldenraines/katello","owner":{"login":"waldenraines","id":4116405,"avatar_url":"https://avatars.githubusercontent.com/u/4116405?v=3","gravatar_id":"","url":"https://api.github.com/users/waldenraines","html_url":"https://github.com/waldenraines","followers_url":"https://api.github.com/users/waldenraines/followers","following_url":"https://api.github.com/users/waldenraines/following{/other_user}","gists_url":"https://api.github.com/users/waldenraines/gists{/gist_id}","starred_url":"https://api.github.com/users/waldenraines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waldenraines/subscriptions","organizations_url":"https://api.github.com/users/waldenraines/orgs","repos_url":"https://api.github.com/users/waldenraines/repos","events_url":"https://api.github.com/users/waldenraines/events{/privacy}","received_events_url":"https://api.github.com/users/waldenraines/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/waldenraines/katello","description":"Katello integrates open source systems management tools into a single solution for controlling the lifecycle of your machines.","fork":true,"url":"https://api.github.com/repos/waldenraines/katello","forks_url":"https://api.github.com/repos/waldenraines/katello/forks","keys_url":"https://api.github.com/repos/waldenraines/katello/keys{/key_id}","collaborators_url":"https://api.github.com/repos/waldenraines/katello/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/waldenraines/katello/teams","hooks_url":"https://api.github.com/repos/waldenraines/katello/hooks","issue_events_url":"https://api.github.com/repos/waldenraines/katello/issues/events{/number}","events_url":"https://api.github.com/repos/waldenraines/katello/events","assignees_url":"https://api.github.com/repos/waldenraines/katello/assignees{/user}","branches_url":"https://api.github.com/repos/waldenraines/katello/branches{/branch}","tags_url":"https://api.github.com/repos/waldenraines/katello/tags","blobs_url":"https://api.github.com/repos/waldenraines/katello/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/waldenraines/katello/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/waldenraines/katello/git/refs{/sha}","trees_url":"https://api.github.com/repos/waldenraines/katello/git/trees{/sha}","statuses_url":"https://api.github.com/repos/waldenraines/katello/statuses/{sha}","languages_url":"https://api.github.com/repos/waldenraines/katello/languages","stargazers_url":"https://api.github.com/repos/waldenraines/katello/stargazers","contributors_url":"https://api.github.com/repos/waldenraines/katello/contributors","subscribers_url":"https://api.github.com/repos/waldenraines/katello/subscribers","subscription_url":"https://api.github.com/repos/waldenraines/katello/subscription","commits_url":"https://api.github.com/repos/waldenraines/katello/commits{/sha}","git_commits_url":"https://api.github.com/repos/waldenraines/katello/git/commits{/sha}","comments_url":"https://api.github.com/repos/waldenraines/katello/comments{/number}","issue_comment_url":"https://api.github.com/repos/waldenraines/katello/issues/comments{/number}","contents_url":"https://api.github.com/repos/waldenraines/katello/contents/{+path}","compare_url":"https://api.github.com/repos/waldenraines/katello/compare/{base}...{head}","merges_url":"https://api.github.com/repos/waldenraines/katello/merges","archive_url":"https://api.github.com/repos/waldenraines/katello/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/waldenraines/katello/downloads","issues_url":"https://api.github.com/repos/waldenraines/katello/issues{/number}","pulls_url":"https://api.github.com/repos/waldenraines/katello/pulls{/number}","milestones_url":"https://api.github.com/repos/waldenraines/katello/milestones{/number}","notifications_url":"https://api.github.com/repos/waldenraines/katello/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/waldenraines/katello/labels{/name}","releases_url":"https://api.github.com/repos/waldenraines/katello/releases{/id}","created_at":"2013-04-10T21:49:02Z","updated_at":"2014-06-24T21:15:25Z","pushed_at":"2015-06-09T04:42:35Z","git_url":"git://github.com/waldenraines/katello.git","ssh_url":"git@github.com:waldenraines/katello.git","clone_url":"https://github.com/waldenraines/katello.git","svn_url":"https://github.com/waldenraines/katello","homepage":"katello.org","size":73968,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Katello:master","ref":"master","sha":"013d7bd5857535f06734c1995a38113f10dc5cf8","user":{"login":"Katello","id":1316386,"avatar_url":"https://avatars.githubusercontent.com/u/1316386?v=3","gravatar_id":"","url":"https://api.github.com/users/Katello","html_url":"https://github.com/Katello","followers_url":"https://api.github.com/users/Katello/followers","following_url":"https://api.github.com/users/Katello/following{/other_user}","gists_url":"https://api.github.com/users/Katello/gists{/gist_id}","starred_url":"https://api.github.com/users/Katello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Katello/subscriptions","organizations_url":"https://api.github.com/users/Katello/orgs","repos_url":"https://api.github.com/users/Katello/repos","events_url":"https://api.github.com/users/Katello/events{/privacy}","received_events_url":"https://api.github.com/users/Katello/received_events","type":"Organization","site_admin":false},"repo":{"id":4007018,"name":"katello","full_name":"Katello/katello","owner":{"login":"Katello","id":1316386,"avatar_url":"https://avatars.githubusercontent.com/u/1316386?v=3","gravatar_id":"","url":"https://api.github.com/users/Katello","html_url":"https://github.com/Katello","followers_url":"https://api.github.com/users/Katello/followers","following_url":"https://api.github.com/users/Katello/following{/other_user}","gists_url":"https://api.github.com/users/Katello/gists{/gist_id}","starred_url":"https://api.github.com/users/Katello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Katello/subscriptions","organizations_url":"https://api.github.com/users/Katello/orgs","repos_url":"https://api.github.com/users/Katello/repos","events_url":"https://api.github.com/users/Katello/events{/privacy}","received_events_url":"https://api.github.com/users/Katello/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Katello/katello","description":"Katello integrates open source systems management tools into a single solution for controlling the lifecycle of your machines.","fork":false,"url":"https://api.github.com/repos/Katello/katello","forks_url":"https://api.github.com/repos/Katello/katello/forks","keys_url":"https://api.github.com/repos/Katello/katello/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Katello/katello/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Katello/katello/teams","hooks_url":"https://api.github.com/repos/Katello/katello/hooks","issue_events_url":"https://api.github.com/repos/Katello/katello/issues/events{/number}","events_url":"https://api.github.com/repos/Katello/katello/events","assignees_url":"https://api.github.com/repos/Katello/katello/assignees{/user}","branches_url":"https://api.github.com/repos/Katello/katello/branches{/branch}","tags_url":"https://api.github.com/repos/Katello/katello/tags","blobs_url":"https://api.github.com/repos/Katello/katello/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Katello/katello/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Katello/katello/git/refs{/sha}","trees_url":"https://api.github.com/repos/Katello/katello/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Katello/katello/statuses/{sha}","languages_url":"https://api.github.com/repos/Katello/katello/languages","stargazers_url":"https://api.github.com/repos/Katello/katello/stargazers","contributors_url":"https://api.github.com/repos/Katello/katello/contributors","subscribers_url":"https://api.github.com/repos/Katello/katello/subscribers","subscription_url":"https://api.github.com/repos/Katello/katello/subscription","commits_url":"https://api.github.com/repos/Katello/katello/commits{/sha}","git_commits_url":"https://api.github.com/repos/Katello/katello/git/commits{/sha}","comments_url":"https://api.github.com/repos/Katello/katello/comments{/number}","issue_comment_url":"https://api.github.com/repos/Katello/katello/issues/comments{/number}","contents_url":"https://api.github.com/repos/Katello/katello/contents/{+path}","compare_url":"https://api.github.com/repos/Katello/katello/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Katello/katello/merges","archive_url":"https://api.github.com/repos/Katello/katello/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Katello/katello/downloads","issues_url":"https://api.github.com/repos/Katello/katello/issues{/number}","pulls_url":"https://api.github.com/repos/Katello/katello/pulls{/number}","milestones_url":"https://api.github.com/repos/Katello/katello/milestones{/number}","notifications_url":"https://api.github.com/repos/Katello/katello/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Katello/katello/labels{/name}","releases_url":"https://api.github.com/repos/Katello/katello/releases{/id}","created_at":"2012-04-12T16:59:08Z","updated_at":"2015-06-03T13:14:09Z","pushed_at":"2015-06-09T04:42:36Z","git_url":"git://github.com/Katello/katello.git","ssh_url":"git@github.com:Katello/katello.git","clone_url":"https://github.com/Katello/katello.git","svn_url":"https://github.com/Katello/katello","homepage":"katello.org","size":233576,"stargazers_count":160,"watchers_count":160,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":108,"mirror_url":null,"open_issues_count":100,"forks":108,"open_issues":100,"watchers":160,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Katello/katello/pulls/5275"},"html":{"href":"https://github.com/Katello/katello/pull/5275"},"issue":{"href":"https://api.github.com/repos/Katello/katello/issues/5275"},"comments":{"href":"https://api.github.com/repos/Katello/katello/issues/5275/comments"},"review_comments":{"href":"https://api.github.com/repos/Katello/katello/pulls/5275/comments"},"review_comment":{"href":"https://api.github.com/repos/Katello/katello/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Katello/katello/pulls/5275/commits"},"statuses":{"href":"https://api.github.com/repos/Katello/katello/statuses/9f2d8dca76e6c12d11b22cafe55218e75c0c1eb0"}}}}