{"action":"created","comment":{"url":"https://api.github.com/repos/18F/dolores-landingham-bot/pulls/comments/41162803","id":41162803,"diff_hunk":"@@ -0,0 +1,27 @@\n+require \"rails_helper\"\n+\n+describe SlackUserFinder do\n+  describe \"#user_exists?\" do\n+    it \"returns true if a user is found\" do\n+      slack_username_from_fixture = \"testusername\"\n+\n+      user_exists = SlackUserFinder.new(\n+        slack_username_from_fixture,\n+        Slack::Web::Client.new\n+      ).user_exists?\n+\n+      expect(user_exists).to be true\n+    end\n+\n+    it \"returns false if a user was not found\" do\n+      fake_slack_user_name = \"testusernamethatdoesnotexist\"\n+\n+      user_exists = SlackUserFinder.new(\n+        fake_slack_user_name,\n+        Slack::Web::Client.new\n+      ).user_exists?\n+\n+      expect(user_exists).to be false","path":"spec/services/slack_user_finder_spec.rb","position":24,"original_position":24,"commit_id":"c74473ca7bc54a6cb46925d02004a61a2f242ce3","original_commit_id":"c74473ca7bc54a6cb46925d02004a61a2f242ce3","user":{"login":"ccostino","id":121565,"avatar_url":"https://avatars.githubusercontent.com/u/121565?v=3","gravatar_id":"","url":"https://api.github.com/users/ccostino","html_url":"https://github.com/ccostino","followers_url":"https://api.github.com/users/ccostino/followers","following_url":"https://api.github.com/users/ccostino/following{/other_user}","gists_url":"https://api.github.com/users/ccostino/gists{/gist_id}","starred_url":"https://api.github.com/users/ccostino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccostino/subscriptions","organizations_url":"https://api.github.com/users/ccostino/orgs","repos_url":"https://api.github.com/users/ccostino/repos","events_url":"https://api.github.com/users/ccostino/events{/privacy}","received_events_url":"https://api.github.com/users/ccostino/received_events","type":"User","site_admin":false},"body":"Oh interesting, thank you for the heads up with the RSpec info (something I'm still diving into).  As for the name, are you thinking that it should be changed in the `EmployeeFinder` service class?  I'm not sure about `is_in_organization?` only because that sounds like it should accept an argument of an organization to me and we're just checking for the existence of a user in the organization we're a part of when logged in.  I agree that the naming could be improved though, especially in light of how it flows with the Rspec matchers.","created_at":"2015-10-05T16:09:26Z","updated_at":"2015-10-05T16:09:26Z","html_url":"https://github.com/18F/dolores-landingham-bot/pull/63#discussion_r41162803","pull_request_url":"https://api.github.com/repos/18F/dolores-landingham-bot/pulls/63","_links":{"self":{"href":"https://api.github.com/repos/18F/dolores-landingham-bot/pulls/comments/41162803"},"html":{"href":"https://github.com/18F/dolores-landingham-bot/pull/63#discussion_r41162803"},"pull_request":{"href":"https://api.github.com/repos/18F/dolores-landingham-bot/pulls/63"}}},"pull_request":{"url":"https://api.github.com/repos/18F/dolores-landingham-bot/pulls/63","id":46697363,"html_url":"https://github.com/18F/dolores-landingham-bot/pull/63","diff_url":"https://github.com/18F/dolores-landingham-bot/pull/63.diff","patch_url":"https://github.com/18F/dolores-landingham-bot/pull/63.patch","issue_url":"https://api.github.com/repos/18F/dolores-landingham-bot/issues/63","number":63,"state":"open","locked":false,"title":"Issue #33:  Slack Username Validation","user":{"login":"ccostino","id":121565,"avatar_url":"https://avatars.githubusercontent.com/u/121565?v=3","gravatar_id":"","url":"https://api.github.com/users/ccostino","html_url":"https://github.com/ccostino","followers_url":"https://api.github.com/users/ccostino/followers","following_url":"https://api.github.com/users/ccostino/following{/other_user}","gists_url":"https://api.github.com/users/ccostino/gists{/gist_id}","starred_url":"https://api.github.com/users/ccostino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccostino/subscriptions","organizations_url":"https://api.github.com/users/ccostino/orgs","repos_url":"https://api.github.com/users/ccostino/repos","events_url":"https://api.github.com/users/ccostino/events{/privacy}","received_events_url":"https://api.github.com/users/ccostino/received_events","type":"User","site_admin":false},"body":"This is the initial changeset with full support and passing tests for the Slack username validation.  There is still one outstanding thing to investigate further with the employee model validation tests as the \"allow_values\" shoulda matcher method seems to be failing.  I want to look into that a bit further to see if it's something that needs to be reported to the shoulda matchers (and gather full details if so), but otherwise this is ready for review and discussion!  Thank you @jessieay for your help with this and coming up with a cleaner approach, especially with the tests!","created_at":"2015-10-03T01:52:07Z","updated_at":"2015-10-05T16:09:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"189de343016b81641aac54ee2dc78a434c099b96","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/18F/dolores-landingham-bot/pulls/63/commits","review_comments_url":"https://api.github.com/repos/18F/dolores-landingham-bot/pulls/63/comments","review_comment_url":"https://api.github.com/repos/18F/dolores-landingham-bot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/18F/dolores-landingham-bot/issues/63/comments","statuses_url":"https://api.github.com/repos/18F/dolores-landingham-bot/statuses/c74473ca7bc54a6cb46925d02004a61a2f242ce3","head":{"label":"18F:cc-slack-username-validation","ref":"cc-slack-username-validation","sha":"c74473ca7bc54a6cb46925d02004a61a2f242ce3","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":42547221,"name":"dolores-landingham-bot","full_name":"18F/dolores-landingham-bot","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/dolores-landingham-bot","description":"A Slack bot to welcome new 18F hires with the authority and compassion of Mrs. Landingham","fork":false,"url":"https://api.github.com/repos/18F/dolores-landingham-bot","forks_url":"https://api.github.com/repos/18F/dolores-landingham-bot/forks","keys_url":"https://api.github.com/repos/18F/dolores-landingham-bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/dolores-landingham-bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/dolores-landingham-bot/teams","hooks_url":"https://api.github.com/repos/18F/dolores-landingham-bot/hooks","issue_events_url":"https://api.github.com/repos/18F/dolores-landingham-bot/issues/events{/number}","events_url":"https://api.github.com/repos/18F/dolores-landingham-bot/events","assignees_url":"https://api.github.com/repos/18F/dolores-landingham-bot/assignees{/user}","branches_url":"https://api.github.com/repos/18F/dolores-landingham-bot/branches{/branch}","tags_url":"https://api.github.com/repos/18F/dolores-landingham-bot/tags","blobs_url":"https://api.github.com/repos/18F/dolores-landingham-bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/dolores-landingham-bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/dolores-landingham-bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/dolores-landingham-bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/dolores-landingham-bot/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/dolores-landingham-bot/languages","stargazers_url":"https://api.github.com/repos/18F/dolores-landingham-bot/stargazers","contributors_url":"https://api.github.com/repos/18F/dolores-landingham-bot/contributors","subscribers_url":"https://api.github.com/repos/18F/dolores-landingham-bot/subscribers","subscription_url":"https://api.github.com/repos/18F/dolores-landingham-bot/subscription","commits_url":"https://api.github.com/repos/18F/dolores-landingham-bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/dolores-landingham-bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/dolores-landingham-bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/dolores-landingham-bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/dolores-landingham-bot/contents/{+path}","compare_url":"https://api.github.com/repos/18F/dolores-landingham-bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/dolores-landingham-bot/merges","archive_url":"https://api.github.com/repos/18F/dolores-landingham-bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/dolores-landingham-bot/downloads","issues_url":"https://api.github.com/repos/18F/dolores-landingham-bot/issues{/number}","pulls_url":"https://api.github.com/repos/18F/dolores-landingham-bot/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/dolores-landingham-bot/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/dolores-landingham-bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/dolores-landingham-bot/labels{/name}","releases_url":"https://api.github.com/repos/18F/dolores-landingham-bot/releases{/id}","created_at":"2015-09-15T21:19:01Z","updated_at":"2015-09-28T12:07:10Z","pushed_at":"2015-10-05T14:10:30Z","git_url":"git://github.com/18F/dolores-landingham-bot.git","ssh_url":"git@github.com:18F/dolores-landingham-bot.git","clone_url":"https://github.com/18F/dolores-landingham-bot.git","svn_url":"https://github.com/18F/dolores-landingham-bot","homepage":null,"size":680,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":19,"forks":1,"open_issues":19,"watchers":5,"default_branch":"master"}},"base":{"label":"18F:master","ref":"master","sha":"05bb820f7736b300e001017780ce071fbd1fcba4","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":42547221,"name":"dolores-landingham-bot","full_name":"18F/dolores-landingham-bot","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/dolores-landingham-bot","description":"A Slack bot to welcome new 18F hires with the authority and compassion of Mrs. Landingham","fork":false,"url":"https://api.github.com/repos/18F/dolores-landingham-bot","forks_url":"https://api.github.com/repos/18F/dolores-landingham-bot/forks","keys_url":"https://api.github.com/repos/18F/dolores-landingham-bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/dolores-landingham-bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/dolores-landingham-bot/teams","hooks_url":"https://api.github.com/repos/18F/dolores-landingham-bot/hooks","issue_events_url":"https://api.github.com/repos/18F/dolores-landingham-bot/issues/events{/number}","events_url":"https://api.github.com/repos/18F/dolores-landingham-bot/events","assignees_url":"https://api.github.com/repos/18F/dolores-landingham-bot/assignees{/user}","branches_url":"https://api.github.com/repos/18F/dolores-landingham-bot/branches{/branch}","tags_url":"https://api.github.com/repos/18F/dolores-landingham-bot/tags","blobs_url":"https://api.github.com/repos/18F/dolores-landingham-bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/dolores-landingham-bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/dolores-landingham-bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/dolores-landingham-bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/dolores-landingham-bot/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/dolores-landingham-bot/languages","stargazers_url":"https://api.github.com/repos/18F/dolores-landingham-bot/stargazers","contributors_url":"https://api.github.com/repos/18F/dolores-landingham-bot/contributors","subscribers_url":"https://api.github.com/repos/18F/dolores-landingham-bot/subscribers","subscription_url":"https://api.github.com/repos/18F/dolores-landingham-bot/subscription","commits_url":"https://api.github.com/repos/18F/dolores-landingham-bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/dolores-landingham-bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/dolores-landingham-bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/dolores-landingham-bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/dolores-landingham-bot/contents/{+path}","compare_url":"https://api.github.com/repos/18F/dolores-landingham-bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/dolores-landingham-bot/merges","archive_url":"https://api.github.com/repos/18F/dolores-landingham-bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/dolores-landingham-bot/downloads","issues_url":"https://api.github.com/repos/18F/dolores-landingham-bot/issues{/number}","pulls_url":"https://api.github.com/repos/18F/dolores-landingham-bot/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/dolores-landingham-bot/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/dolores-landingham-bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/dolores-landingham-bot/labels{/name}","releases_url":"https://api.github.com/repos/18F/dolores-landingham-bot/releases{/id}","created_at":"2015-09-15T21:19:01Z","updated_at":"2015-09-28T12:07:10Z","pushed_at":"2015-10-05T14:10:30Z","git_url":"git://github.com/18F/dolores-landingham-bot.git","ssh_url":"git@github.com:18F/dolores-landingham-bot.git","clone_url":"https://github.com/18F/dolores-landingham-bot.git","svn_url":"https://github.com/18F/dolores-landingham-bot","homepage":null,"size":680,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":19,"forks":1,"open_issues":19,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/18F/dolores-landingham-bot/pulls/63"},"html":{"href":"https://github.com/18F/dolores-landingham-bot/pull/63"},"issue":{"href":"https://api.github.com/repos/18F/dolores-landingham-bot/issues/63"},"comments":{"href":"https://api.github.com/repos/18F/dolores-landingham-bot/issues/63/comments"},"review_comments":{"href":"https://api.github.com/repos/18F/dolores-landingham-bot/pulls/63/comments"},"review_comment":{"href":"https://api.github.com/repos/18F/dolores-landingham-bot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/18F/dolores-landingham-bot/pulls/63/commits"},"statuses":{"href":"https://api.github.com/repos/18F/dolores-landingham-bot/statuses/c74473ca7bc54a6cb46925d02004a61a2f242ce3"}}}}