{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/comments/37746837","id":37746837,"diff_hunk":"@@ -167,7 +167,16 @@ def setup\n     end\n \n     test 'update_usergroups calls refresh_ldap if entry belongs to some group' do\n-      ExternalUsergroup.expects(:find_by_name).with('ipausers').returns(ExternalUsergroup.new)\n+      @auth_source_ldap.expects(:external_usergroups).returns(ExternalUsergroup)\n+      ExternalUsergroup.expects(:where).with('lower(name) = ?', 'ipausers').returns([ExternalUsergroup.new])","path":"test/unit/auth_sources/auth_source_ldap_test.rb","position":6,"original_position":6,"commit_id":"6e0e5bfee9330cdbf8160222fc7afc5ec20114bf","original_commit_id":"6e0e5bfee9330cdbf8160222fc7afc5ec20114bf","user":{"login":"domcleal","id":482089,"avatar_url":"https://avatars.githubusercontent.com/u/482089?v=3","gravatar_id":"","url":"https://api.github.com/users/domcleal","html_url":"https://github.com/domcleal","followers_url":"https://api.github.com/users/domcleal/followers","following_url":"https://api.github.com/users/domcleal/following{/other_user}","gists_url":"https://api.github.com/users/domcleal/gists{/gist_id}","starred_url":"https://api.github.com/users/domcleal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domcleal/subscriptions","organizations_url":"https://api.github.com/users/domcleal/orgs","repos_url":"https://api.github.com/users/domcleal/repos","events_url":"https://api.github.com/users/domcleal/events{/privacy}","received_events_url":"https://api.github.com/users/domcleal/received_events","type":"User","site_admin":false},"body":"Since we're using a little bit of SQL here, can you avoid stubbing it and instead use the real DB?  This'll mean we get testing on all three supported DBs via unit tests.","created_at":"2015-08-24T12:48:04Z","updated_at":"2015-08-24T12:48:04Z","html_url":"https://github.com/theforeman/foreman/pull/2621#discussion_r37746837","pull_request_url":"https://api.github.com/repos/theforeman/foreman/pulls/2621","_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments/37746837"},"html":{"href":"https://github.com/theforeman/foreman/pull/2621#discussion_r37746837"},"pull_request":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2621"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/2621","id":42824359,"html_url":"https://github.com/theforeman/foreman/pull/2621","diff_url":"https://github.com/theforeman/foreman/pull/2621.diff","patch_url":"https://github.com/theforeman/foreman/pull/2621.patch","issue_url":"https://api.github.com/repos/theforeman/foreman/issues/2621","number":2621,"state":"open","locked":false,"title":"Fixes #11428 - External user groups refresh shouldn't be case sensitive","user":{"login":"eLobato","id":598891,"avatar_url":"https://avatars.githubusercontent.com/u/598891?v=3","gravatar_id":"","url":"https://api.github.com/users/eLobato","html_url":"https://github.com/eLobato","followers_url":"https://api.github.com/users/eLobato/followers","following_url":"https://api.github.com/users/eLobato/following{/other_user}","gists_url":"https://api.github.com/users/eLobato/gists{/gist_id}","starred_url":"https://api.github.com/users/eLobato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eLobato/subscriptions","organizations_url":"https://api.github.com/users/eLobato/orgs","repos_url":"https://api.github.com/users/eLobato/repos","events_url":"https://api.github.com/users/eLobato/events{/privacy}","received_events_url":"https://api.github.com/users/eLobato/received_events","type":"User","site_admin":false},"body":"group_list in ldap_fluff returns a list of lowercase LDAP GIDs.\r\nWhen AuthSourceLdap tries to run update_usergroups to refresh the external\r\nuser groups, it will try to match these lowercase gids with external user\r\ngroup names.\r\n\r\nHowever, we don't enforce external user group names to be lowercase.\r\nIf an external user group contains any capital letter, it will not be\r\nsynced as it will not match the lowercase GID.\r\n\r\nThis commit makes sure we search for external groups case insensitive,\r\nso we can match LDAP GIDs with external groups names.","created_at":"2015-08-19T14:57:08Z","updated_at":"2015-08-24T12:48:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a16183448127af24878e2955aec8c965a95df97","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/foreman/pulls/2621/commits","review_comments_url":"https://api.github.com/repos/theforeman/foreman/pulls/2621/comments","review_comment_url":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theforeman/foreman/issues/2621/comments","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/6e0e5bfee9330cdbf8160222fc7afc5ec20114bf","head":{"label":"eLobato:7355","ref":"7355","sha":"6e0e5bfee9330cdbf8160222fc7afc5ec20114bf","user":{"login":"eLobato","id":598891,"avatar_url":"https://avatars.githubusercontent.com/u/598891?v=3","gravatar_id":"","url":"https://api.github.com/users/eLobato","html_url":"https://github.com/eLobato","followers_url":"https://api.github.com/users/eLobato/followers","following_url":"https://api.github.com/users/eLobato/following{/other_user}","gists_url":"https://api.github.com/users/eLobato/gists{/gist_id}","starred_url":"https://api.github.com/users/eLobato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eLobato/subscriptions","organizations_url":"https://api.github.com/users/eLobato/orgs","repos_url":"https://api.github.com/users/eLobato/repos","events_url":"https://api.github.com/users/eLobato/events{/privacy}","received_events_url":"https://api.github.com/users/eLobato/received_events","type":"User","site_admin":false},"repo":{"id":5842097,"name":"foreman","full_name":"eLobato/foreman","owner":{"login":"eLobato","id":598891,"avatar_url":"https://avatars.githubusercontent.com/u/598891?v=3","gravatar_id":"","url":"https://api.github.com/users/eLobato","html_url":"https://github.com/eLobato","followers_url":"https://api.github.com/users/eLobato/followers","following_url":"https://api.github.com/users/eLobato/following{/other_user}","gists_url":"https://api.github.com/users/eLobato/gists{/gist_id}","starred_url":"https://api.github.com/users/eLobato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eLobato/subscriptions","organizations_url":"https://api.github.com/users/eLobato/orgs","repos_url":"https://api.github.com/users/eLobato/repos","events_url":"https://api.github.com/users/eLobato/events{/privacy}","received_events_url":"https://api.github.com/users/eLobato/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eLobato/foreman","description":"an application that automates the lifecycle of servers ","fork":true,"url":"https://api.github.com/repos/eLobato/foreman","forks_url":"https://api.github.com/repos/eLobato/foreman/forks","keys_url":"https://api.github.com/repos/eLobato/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eLobato/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eLobato/foreman/teams","hooks_url":"https://api.github.com/repos/eLobato/foreman/hooks","issue_events_url":"https://api.github.com/repos/eLobato/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/eLobato/foreman/events","assignees_url":"https://api.github.com/repos/eLobato/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/eLobato/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/eLobato/foreman/tags","blobs_url":"https://api.github.com/repos/eLobato/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eLobato/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eLobato/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/eLobato/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eLobato/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/eLobato/foreman/languages","stargazers_url":"https://api.github.com/repos/eLobato/foreman/stargazers","contributors_url":"https://api.github.com/repos/eLobato/foreman/contributors","subscribers_url":"https://api.github.com/repos/eLobato/foreman/subscribers","subscription_url":"https://api.github.com/repos/eLobato/foreman/subscription","commits_url":"https://api.github.com/repos/eLobato/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/eLobato/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/eLobato/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/eLobato/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/eLobato/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/eLobato/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eLobato/foreman/merges","archive_url":"https://api.github.com/repos/eLobato/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eLobato/foreman/downloads","issues_url":"https://api.github.com/repos/eLobato/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/eLobato/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/eLobato/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/eLobato/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eLobato/foreman/labels{/name}","releases_url":"https://api.github.com/repos/eLobato/foreman/releases{/id}","created_at":"2012-09-17T14:23:49Z","updated_at":"2015-05-06T16:17:15Z","pushed_at":"2015-08-24T11:00:55Z","git_url":"git://github.com/eLobato/foreman.git","ssh_url":"git@github.com:eLobato/foreman.git","clone_url":"https://github.com/eLobato/foreman.git","svn_url":"https://github.com/eLobato/foreman","homepage":"http://theforeman.org","size":31918,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"develop"}},"base":{"label":"theforeman:develop","ref":"develop","sha":"4fd1ae8501d41947edad535875a43e5e7849f370","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"repo":{"id":258750,"name":"foreman","full_name":"theforeman/foreman","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/theforeman/foreman","description":"an application that automates the lifecycle of servers ","fork":false,"url":"https://api.github.com/repos/theforeman/foreman","forks_url":"https://api.github.com/repos/theforeman/foreman/forks","keys_url":"https://api.github.com/repos/theforeman/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/foreman/teams","hooks_url":"https://api.github.com/repos/theforeman/foreman/hooks","issue_events_url":"https://api.github.com/repos/theforeman/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/foreman/events","assignees_url":"https://api.github.com/repos/theforeman/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/foreman/tags","blobs_url":"https://api.github.com/repos/theforeman/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/foreman/languages","stargazers_url":"https://api.github.com/repos/theforeman/foreman/stargazers","contributors_url":"https://api.github.com/repos/theforeman/foreman/contributors","subscribers_url":"https://api.github.com/repos/theforeman/foreman/subscribers","subscription_url":"https://api.github.com/repos/theforeman/foreman/subscription","commits_url":"https://api.github.com/repos/theforeman/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/theforeman/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/foreman/merges","archive_url":"https://api.github.com/repos/theforeman/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/foreman/downloads","issues_url":"https://api.github.com/repos/theforeman/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/foreman/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/foreman/releases{/id}","created_at":"2009-07-23T15:07:00Z","updated_at":"2015-08-23T19:08:14Z","pushed_at":"2015-08-24T12:44:25Z","git_url":"git://github.com/theforeman/foreman.git","ssh_url":"git@github.com:theforeman/foreman.git","clone_url":"https://github.com/theforeman/foreman.git","svn_url":"https://github.com/theforeman/foreman","homepage":"http://theforeman.org","size":88941,"stargazers_count":829,"watchers_count":829,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":425,"mirror_url":null,"open_issues_count":85,"forks":425,"open_issues":85,"watchers":829,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2621"},"html":{"href":"https://github.com/theforeman/foreman/pull/2621"},"issue":{"href":"https://api.github.com/repos/theforeman/foreman/issues/2621"},"comments":{"href":"https://api.github.com/repos/theforeman/foreman/issues/2621/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2621/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2621/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/foreman/statuses/6e0e5bfee9330cdbf8160222fc7afc5ec20114bf"}}}}