{"action":"created","comment":{"url":"https://api.github.com/repos/mitodl/open-discussions/pulls/comments/212688693","pull_request_review_id":149377513,"id":212688693,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjY4ODY5Mw==","diff_hunk":"@@ -0,0 +1,85 @@\n+// @flow\n+import React from \"react\"\n+import { mount } from \"enzyme\"\n+import { assert } from \"chai\"\n+\n+import FollowButton from \"./FollowButton\"\n+import LoginPopup from \"./LoginPopup\"\n+\n+import { makePost } from \"../factories/posts\"\n+import { shouldIf } from \"../lib/test_utils\"\n+import * as utilFuncs from \"../lib/util\"\n+import Router from \"../Router\"\n+import IntegrationTestHelper from \"../util/integration_test_helper\"\n+\n+describe(\"FollowButton\", () => {\n+  let helper, toggleFollowPostStub, post\n+\n+  beforeEach(() => {\n+    //sandbox = sinon.createSandbox()","path":"static/js/components/FollowButton_test.js","position":19,"original_position":19,"commit_id":"f6749b364eb8ec20dfe3bb49da9861a17ff9f475","original_commit_id":"f6749b364eb8ec20dfe3bb49da9861a17ff9f475","user":{"login":"aliceriot","id":6207644,"node_id":"MDQ6VXNlcjYyMDc2NDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/6207644?v=4","gravatar_id":"","url":"https://api.github.com/users/aliceriot","html_url":"https://github.com/aliceriot","followers_url":"https://api.github.com/users/aliceriot/followers","following_url":"https://api.github.com/users/aliceriot/following{/other_user}","gists_url":"https://api.github.com/users/aliceriot/gists{/gist_id}","starred_url":"https://api.github.com/users/aliceriot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliceriot/subscriptions","organizations_url":"https://api.github.com/users/aliceriot/orgs","repos_url":"https://api.github.com/users/aliceriot/repos","events_url":"https://api.github.com/users/aliceriot/events{/privacy}","received_events_url":"https://api.github.com/users/aliceriot/received_events","type":"User","site_admin":false},"body":"stray comment?","created_at":"2018-08-24T16:49:08Z","updated_at":"2018-08-24T16:55:01Z","html_url":"https://github.com/mitodl/open-discussions/pull/1106#discussion_r212688693","pull_request_url":"https://api.github.com/repos/mitodl/open-discussions/pulls/1106","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mitodl/open-discussions/pulls/comments/212688693"},"html":{"href":"https://github.com/mitodl/open-discussions/pull/1106#discussion_r212688693"},"pull_request":{"href":"https://api.github.com/repos/mitodl/open-discussions/pulls/1106"}}},"pull_request":{"url":"https://api.github.com/repos/mitodl/open-discussions/pulls/1106","id":210161695,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwMTYxNjk1","html_url":"https://github.com/mitodl/open-discussions/pull/1106","diff_url":"https://github.com/mitodl/open-discussions/pull/1106.diff","patch_url":"https://github.com/mitodl/open-discussions/pull/1106.patch","issue_url":"https://api.github.com/repos/mitodl/open-discussions/issues/1106","number":1106,"state":"open","locked":false,"title":"LoginPopup for Follow button","user":{"login":"mbertrand","id":187676,"node_id":"MDQ6VXNlcjE4NzY3Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/187676?v=4","gravatar_id":"","url":"https://api.github.com/users/mbertrand","html_url":"https://github.com/mbertrand","followers_url":"https://api.github.com/users/mbertrand/followers","following_url":"https://api.github.com/users/mbertrand/following{/other_user}","gists_url":"https://api.github.com/users/mbertrand/gists{/gist_id}","starred_url":"https://api.github.com/users/mbertrand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbertrand/subscriptions","organizations_url":"https://api.github.com/users/mbertrand/orgs","repos_url":"https://api.github.com/users/mbertrand/repos","events_url":"https://api.github.com/users/mbertrand/events{/privacy}","received_events_url":"https://api.github.com/users/mbertrand/received_events","type":"User","site_admin":false},"body":"#### Pre-Flight checklist\r\n\r\n- [x] Testing\r\n  - [x] Code is tested\r\n  - [x] Changes have been manually tested\r\n\r\n#### What are the relevant tickets?\r\nPartially addresses #1051\r\n\r\n#### What's this PR do?\r\n- Adds the `LoginPopup` component to the follow button\r\n- Creates a new class for `FollowButton` instead of creating it via a function within ExpandedPostDisplay.\r\n- Adds `className` to the LoginPopup so its styling can be customized (necessary for the Follow button, to avoid it overflowing past the right edge of the browser window).\r\n\r\n#### How should this be manually tested?\r\n- When logged in, the Follow/Unfollow button should work as before on the post detail page.\r\n- When not logged in, the Follow button should still display and clicking it should display the login popup.\r\n\r\n","created_at":"2018-08-22T14:52:05Z","updated_at":"2018-08-24T16:55:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"462087bc2ae45fa795b81c5690cc756bf56a104c","assignee":{"login":"aliceriot","id":6207644,"node_id":"MDQ6VXNlcjYyMDc2NDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/6207644?v=4","gravatar_id":"","url":"https://api.github.com/users/aliceriot","html_url":"https://github.com/aliceriot","followers_url":"https://api.github.com/users/aliceriot/followers","following_url":"https://api.github.com/users/aliceriot/following{/other_user}","gists_url":"https://api.github.com/users/aliceriot/gists{/gist_id}","starred_url":"https://api.github.com/users/aliceriot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliceriot/subscriptions","organizations_url":"https://api.github.com/users/aliceriot/orgs","repos_url":"https://api.github.com/users/aliceriot/repos","events_url":"https://api.github.com/users/aliceriot/events{/privacy}","received_events_url":"https://api.github.com/users/aliceriot/received_events","type":"User","site_admin":false},"assignees":[{"login":"aliceriot","id":6207644,"node_id":"MDQ6VXNlcjYyMDc2NDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/6207644?v=4","gravatar_id":"","url":"https://api.github.com/users/aliceriot","html_url":"https://github.com/aliceriot","followers_url":"https://api.github.com/users/aliceriot/followers","following_url":"https://api.github.com/users/aliceriot/following{/other_user}","gists_url":"https://api.github.com/users/aliceriot/gists{/gist_id}","starred_url":"https://api.github.com/users/aliceriot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliceriot/subscriptions","organizations_url":"https://api.github.com/users/aliceriot/orgs","repos_url":"https://api.github.com/users/aliceriot/repos","events_url":"https://api.github.com/users/aliceriot/events{/privacy}","received_events_url":"https://api.github.com/users/aliceriot/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":627437808,"node_id":"MDU6TGFiZWw2Mjc0Mzc4MDg=","url":"https://api.github.com/repos/mitodl/open-discussions/labels/Needs%20Review","name":"Needs Review","color":"f9d0c4","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/mitodl/open-discussions/pulls/1106/commits","review_comments_url":"https://api.github.com/repos/mitodl/open-discussions/pulls/1106/comments","review_comment_url":"https://api.github.com/repos/mitodl/open-discussions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mitodl/open-discussions/issues/1106/comments","statuses_url":"https://api.github.com/repos/mitodl/open-discussions/statuses/f6749b364eb8ec20dfe3bb49da9861a17ff9f475","head":{"label":"mitodl:mb/anonpopup2","ref":"mb/anonpopup2","sha":"f6749b364eb8ec20dfe3bb49da9861a17ff9f475","user":{"login":"mitodl","id":7918516,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MTg1MTY=","avatar_url":"https://avatars2.githubusercontent.com/u/7918516?v=4","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"repo":{"id":93760926,"node_id":"MDEwOlJlcG9zaXRvcnk5Mzc2MDkyNg==","name":"open-discussions","full_name":"mitodl/open-discussions","owner":{"login":"mitodl","id":7918516,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MTg1MTY=","avatar_url":"https://avatars2.githubusercontent.com/u/7918516?v=4","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitodl/open-discussions","description":null,"fork":false,"url":"https://api.github.com/repos/mitodl/open-discussions","forks_url":"https://api.github.com/repos/mitodl/open-discussions/forks","keys_url":"https://api.github.com/repos/mitodl/open-discussions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitodl/open-discussions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitodl/open-discussions/teams","hooks_url":"https://api.github.com/repos/mitodl/open-discussions/hooks","issue_events_url":"https://api.github.com/repos/mitodl/open-discussions/issues/events{/number}","events_url":"https://api.github.com/repos/mitodl/open-discussions/events","assignees_url":"https://api.github.com/repos/mitodl/open-discussions/assignees{/user}","branches_url":"https://api.github.com/repos/mitodl/open-discussions/branches{/branch}","tags_url":"https://api.github.com/repos/mitodl/open-discussions/tags","blobs_url":"https://api.github.com/repos/mitodl/open-discussions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitodl/open-discussions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitodl/open-discussions/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitodl/open-discussions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitodl/open-discussions/statuses/{sha}","languages_url":"https://api.github.com/repos/mitodl/open-discussions/languages","stargazers_url":"https://api.github.com/repos/mitodl/open-discussions/stargazers","contributors_url":"https://api.github.com/repos/mitodl/open-discussions/contributors","subscribers_url":"https://api.github.com/repos/mitodl/open-discussions/subscribers","subscription_url":"https://api.github.com/repos/mitodl/open-discussions/subscription","commits_url":"https://api.github.com/repos/mitodl/open-discussions/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitodl/open-discussions/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitodl/open-discussions/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitodl/open-discussions/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitodl/open-discussions/contents/{+path}","compare_url":"https://api.github.com/repos/mitodl/open-discussions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitodl/open-discussions/merges","archive_url":"https://api.github.com/repos/mitodl/open-discussions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitodl/open-discussions/downloads","issues_url":"https://api.github.com/repos/mitodl/open-discussions/issues{/number}","pulls_url":"https://api.github.com/repos/mitodl/open-discussions/pulls{/number}","milestones_url":"https://api.github.com/repos/mitodl/open-discussions/milestones{/number}","notifications_url":"https://api.github.com/repos/mitodl/open-discussions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitodl/open-discussions/labels{/name}","releases_url":"https://api.github.com/repos/mitodl/open-discussions/releases{/id}","deployments_url":"https://api.github.com/repos/mitodl/open-discussions/deployments","created_at":"2017-06-08T14:46:35Z","updated_at":"2018-08-24T16:21:19Z","pushed_at":"2018-08-24T16:34:28Z","git_url":"git://github.com/mitodl/open-discussions.git","ssh_url":"git@github.com:mitodl/open-discussions.git","clone_url":"https://github.com/mitodl/open-discussions.git","svn_url":"https://github.com/mitodl/open-discussions","homepage":null,"size":2811,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":107,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":107,"watchers":3,"default_branch":"master"}},"base":{"label":"mitodl:master","ref":"master","sha":"98cda1d1e44db7fecbd8e2bf46979985f75666a9","user":{"login":"mitodl","id":7918516,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MTg1MTY=","avatar_url":"https://avatars2.githubusercontent.com/u/7918516?v=4","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"repo":{"id":93760926,"node_id":"MDEwOlJlcG9zaXRvcnk5Mzc2MDkyNg==","name":"open-discussions","full_name":"mitodl/open-discussions","owner":{"login":"mitodl","id":7918516,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MTg1MTY=","avatar_url":"https://avatars2.githubusercontent.com/u/7918516?v=4","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitodl/open-discussions","description":null,"fork":false,"url":"https://api.github.com/repos/mitodl/open-discussions","forks_url":"https://api.github.com/repos/mitodl/open-discussions/forks","keys_url":"https://api.github.com/repos/mitodl/open-discussions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitodl/open-discussions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitodl/open-discussions/teams","hooks_url":"https://api.github.com/repos/mitodl/open-discussions/hooks","issue_events_url":"https://api.github.com/repos/mitodl/open-discussions/issues/events{/number}","events_url":"https://api.github.com/repos/mitodl/open-discussions/events","assignees_url":"https://api.github.com/repos/mitodl/open-discussions/assignees{/user}","branches_url":"https://api.github.com/repos/mitodl/open-discussions/branches{/branch}","tags_url":"https://api.github.com/repos/mitodl/open-discussions/tags","blobs_url":"https://api.github.com/repos/mitodl/open-discussions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitodl/open-discussions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitodl/open-discussions/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitodl/open-discussions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitodl/open-discussions/statuses/{sha}","languages_url":"https://api.github.com/repos/mitodl/open-discussions/languages","stargazers_url":"https://api.github.com/repos/mitodl/open-discussions/stargazers","contributors_url":"https://api.github.com/repos/mitodl/open-discussions/contributors","subscribers_url":"https://api.github.com/repos/mitodl/open-discussions/subscribers","subscription_url":"https://api.github.com/repos/mitodl/open-discussions/subscription","commits_url":"https://api.github.com/repos/mitodl/open-discussions/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitodl/open-discussions/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitodl/open-discussions/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitodl/open-discussions/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitodl/open-discussions/contents/{+path}","compare_url":"https://api.github.com/repos/mitodl/open-discussions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitodl/open-discussions/merges","archive_url":"https://api.github.com/repos/mitodl/open-discussions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitodl/open-discussions/downloads","issues_url":"https://api.github.com/repos/mitodl/open-discussions/issues{/number}","pulls_url":"https://api.github.com/repos/mitodl/open-discussions/pulls{/number}","milestones_url":"https://api.github.com/repos/mitodl/open-discussions/milestones{/number}","notifications_url":"https://api.github.com/repos/mitodl/open-discussions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitodl/open-discussions/labels{/name}","releases_url":"https://api.github.com/repos/mitodl/open-discussions/releases{/id}","deployments_url":"https://api.github.com/repos/mitodl/open-discussions/deployments","created_at":"2017-06-08T14:46:35Z","updated_at":"2018-08-24T16:21:19Z","pushed_at":"2018-08-24T16:34:28Z","git_url":"git://github.com/mitodl/open-discussions.git","ssh_url":"git@github.com:mitodl/open-discussions.git","clone_url":"https://github.com/mitodl/open-discussions.git","svn_url":"https://github.com/mitodl/open-discussions","homepage":null,"size":2811,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":107,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":107,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mitodl/open-discussions/pulls/1106"},"html":{"href":"https://github.com/mitodl/open-discussions/pull/1106"},"issue":{"href":"https://api.github.com/repos/mitodl/open-discussions/issues/1106"},"comments":{"href":"https://api.github.com/repos/mitodl/open-discussions/issues/1106/comments"},"review_comments":{"href":"https://api.github.com/repos/mitodl/open-discussions/pulls/1106/comments"},"review_comment":{"href":"https://api.github.com/repos/mitodl/open-discussions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mitodl/open-discussions/pulls/1106/commits"},"statuses":{"href":"https://api.github.com/repos/mitodl/open-discussions/statuses/f6749b364eb8ec20dfe3bb49da9861a17ff9f475"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"aliceriot"}}