{"action":"created","comment":{"url":"https://api.github.com/repos/amcrawford/slota-shop/pulls/comments/44734097","id":44734097,"diff_hunk":"@@ -0,0 +1,26 @@\n+require 'test_helper'\n+\n+class VisitorRedirectedToLoginWhenClicksCheckoutTest < ActionDispatch::IntegrationTest\n+  test 'user that has not logged in directed to login when click checkout' do\n+    create_shop\n+    create_user\n+    create_cart_for_visitor\n+\n+    visit '/cart'\n+    click_button \"Place Order\"\n+\n+    assert_equal login_path, current_path\n+    assert page.has_content?(\"Please login before placing order.\")\n+\n+    login_user\n+    visit '/cart'\n+\n+    assert page.has_content?(\"Cart (1)\")\n+\n+    click_button \"Place Order\"\n+\n+    assert_equal '/orders', current_path","path":"test/integration/visitor_redirected_to_login_when_clicks_checkout_test.rb","position":22,"original_position":22,"commit_id":"3e0092aac2f5ac28cde685b3ba793b5872a74186","original_commit_id":"3e0092aac2f5ac28cde685b3ba793b5872a74186","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-11-13T00:01:41Z","updated_at":"2015-11-13T00:01:41Z","html_url":"https://github.com/amcrawford/slota-shop/pull/63#discussion_r44734097","pull_request_url":"https://api.github.com/repos/amcrawford/slota-shop/pulls/63","_links":{"self":{"href":"https://api.github.com/repos/amcrawford/slota-shop/pulls/comments/44734097"},"html":{"href":"https://github.com/amcrawford/slota-shop/pull/63#discussion_r44734097"},"pull_request":{"href":"https://api.github.com/repos/amcrawford/slota-shop/pulls/63"}}},"pull_request":{"url":"https://api.github.com/repos/amcrawford/slota-shop/pulls/63","id":50587100,"html_url":"https://github.com/amcrawford/slota-shop/pull/63","diff_url":"https://github.com/amcrawford/slota-shop/pull/63.diff","patch_url":"https://github.com/amcrawford/slota-shop/pull/63.patch","issue_url":"https://api.github.com/repos/amcrawford/slota-shop/issues/63","number":63,"state":"open","locked":false,"title":"Login at checkout","user":{"login":"amcrawford","id":11097011,"avatar_url":"https://avatars.githubusercontent.com/u/11097011?v=3","gravatar_id":"","url":"https://api.github.com/users/amcrawford","html_url":"https://github.com/amcrawford","followers_url":"https://api.github.com/users/amcrawford/followers","following_url":"https://api.github.com/users/amcrawford/following{/other_user}","gists_url":"https://api.github.com/users/amcrawford/gists{/gist_id}","starred_url":"https://api.github.com/users/amcrawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcrawford/subscriptions","organizations_url":"https://api.github.com/users/amcrawford/orgs","repos_url":"https://api.github.com/users/amcrawford/repos","events_url":"https://api.github.com/users/amcrawford/events{/privacy}","received_events_url":"https://api.github.com/users/amcrawford/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-13T00:01:38Z","updated_at":"2015-11-13T00:01:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"35603c34ab9da6612970667c521be3dba35bc30d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amcrawford/slota-shop/pulls/63/commits","review_comments_url":"https://api.github.com/repos/amcrawford/slota-shop/pulls/63/comments","review_comment_url":"https://api.github.com/repos/amcrawford/slota-shop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amcrawford/slota-shop/issues/63/comments","statuses_url":"https://api.github.com/repos/amcrawford/slota-shop/statuses/3e0092aac2f5ac28cde685b3ba793b5872a74186","head":{"label":"amcrawford:login-at-checkout","ref":"login-at-checkout","sha":"3e0092aac2f5ac28cde685b3ba793b5872a74186","user":{"login":"amcrawford","id":11097011,"avatar_url":"https://avatars.githubusercontent.com/u/11097011?v=3","gravatar_id":"","url":"https://api.github.com/users/amcrawford","html_url":"https://github.com/amcrawford","followers_url":"https://api.github.com/users/amcrawford/followers","following_url":"https://api.github.com/users/amcrawford/following{/other_user}","gists_url":"https://api.github.com/users/amcrawford/gists{/gist_id}","starred_url":"https://api.github.com/users/amcrawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcrawford/subscriptions","organizations_url":"https://api.github.com/users/amcrawford/orgs","repos_url":"https://api.github.com/users/amcrawford/repos","events_url":"https://api.github.com/users/amcrawford/events{/privacy}","received_events_url":"https://api.github.com/users/amcrawford/received_events","type":"User","site_admin":false},"repo":{"id":45855371,"name":"slota-shop","full_name":"amcrawford/slota-shop","owner":{"login":"amcrawford","id":11097011,"avatar_url":"https://avatars.githubusercontent.com/u/11097011?v=3","gravatar_id":"","url":"https://api.github.com/users/amcrawford","html_url":"https://github.com/amcrawford","followers_url":"https://api.github.com/users/amcrawford/followers","following_url":"https://api.github.com/users/amcrawford/following{/other_user}","gists_url":"https://api.github.com/users/amcrawford/gists{/gist_id}","starred_url":"https://api.github.com/users/amcrawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcrawford/subscriptions","organizations_url":"https://api.github.com/users/amcrawford/orgs","repos_url":"https://api.github.com/users/amcrawford/repos","events_url":"https://api.github.com/users/amcrawford/events{/privacy}","received_events_url":"https://api.github.com/users/amcrawford/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amcrawford/slota-shop","description":"","fork":false,"url":"https://api.github.com/repos/amcrawford/slota-shop","forks_url":"https://api.github.com/repos/amcrawford/slota-shop/forks","keys_url":"https://api.github.com/repos/amcrawford/slota-shop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amcrawford/slota-shop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amcrawford/slota-shop/teams","hooks_url":"https://api.github.com/repos/amcrawford/slota-shop/hooks","issue_events_url":"https://api.github.com/repos/amcrawford/slota-shop/issues/events{/number}","events_url":"https://api.github.com/repos/amcrawford/slota-shop/events","assignees_url":"https://api.github.com/repos/amcrawford/slota-shop/assignees{/user}","branches_url":"https://api.github.com/repos/amcrawford/slota-shop/branches{/branch}","tags_url":"https://api.github.com/repos/amcrawford/slota-shop/tags","blobs_url":"https://api.github.com/repos/amcrawford/slota-shop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amcrawford/slota-shop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amcrawford/slota-shop/git/refs{/sha}","trees_url":"https://api.github.com/repos/amcrawford/slota-shop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amcrawford/slota-shop/statuses/{sha}","languages_url":"https://api.github.com/repos/amcrawford/slota-shop/languages","stargazers_url":"https://api.github.com/repos/amcrawford/slota-shop/stargazers","contributors_url":"https://api.github.com/repos/amcrawford/slota-shop/contributors","subscribers_url":"https://api.github.com/repos/amcrawford/slota-shop/subscribers","subscription_url":"https://api.github.com/repos/amcrawford/slota-shop/subscription","commits_url":"https://api.github.com/repos/amcrawford/slota-shop/commits{/sha}","git_commits_url":"https://api.github.com/repos/amcrawford/slota-shop/git/commits{/sha}","comments_url":"https://api.github.com/repos/amcrawford/slota-shop/comments{/number}","issue_comment_url":"https://api.github.com/repos/amcrawford/slota-shop/issues/comments{/number}","contents_url":"https://api.github.com/repos/amcrawford/slota-shop/contents/{+path}","compare_url":"https://api.github.com/repos/amcrawford/slota-shop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amcrawford/slota-shop/merges","archive_url":"https://api.github.com/repos/amcrawford/slota-shop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amcrawford/slota-shop/downloads","issues_url":"https://api.github.com/repos/amcrawford/slota-shop/issues{/number}","pulls_url":"https://api.github.com/repos/amcrawford/slota-shop/pulls{/number}","milestones_url":"https://api.github.com/repos/amcrawford/slota-shop/milestones{/number}","notifications_url":"https://api.github.com/repos/amcrawford/slota-shop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amcrawford/slota-shop/labels{/name}","releases_url":"https://api.github.com/repos/amcrawford/slota-shop/releases{/id}","created_at":"2015-11-09T17:42:58Z","updated_at":"2015-11-12T20:19:13Z","pushed_at":"2015-11-13T00:01:39Z","git_url":"git://github.com/amcrawford/slota-shop.git","ssh_url":"git@github.com:amcrawford/slota-shop.git","clone_url":"https://github.com/amcrawford/slota-shop.git","svn_url":"https://github.com/amcrawford/slota-shop","homepage":null,"size":512,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":19,"forks":0,"open_issues":19,"watchers":0,"default_branch":"master"}},"base":{"label":"amcrawford:master","ref":"master","sha":"424f2e7d72efa37ba7d6c6cf685efb412a38e58a","user":{"login":"amcrawford","id":11097011,"avatar_url":"https://avatars.githubusercontent.com/u/11097011?v=3","gravatar_id":"","url":"https://api.github.com/users/amcrawford","html_url":"https://github.com/amcrawford","followers_url":"https://api.github.com/users/amcrawford/followers","following_url":"https://api.github.com/users/amcrawford/following{/other_user}","gists_url":"https://api.github.com/users/amcrawford/gists{/gist_id}","starred_url":"https://api.github.com/users/amcrawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcrawford/subscriptions","organizations_url":"https://api.github.com/users/amcrawford/orgs","repos_url":"https://api.github.com/users/amcrawford/repos","events_url":"https://api.github.com/users/amcrawford/events{/privacy}","received_events_url":"https://api.github.com/users/amcrawford/received_events","type":"User","site_admin":false},"repo":{"id":45855371,"name":"slota-shop","full_name":"amcrawford/slota-shop","owner":{"login":"amcrawford","id":11097011,"avatar_url":"https://avatars.githubusercontent.com/u/11097011?v=3","gravatar_id":"","url":"https://api.github.com/users/amcrawford","html_url":"https://github.com/amcrawford","followers_url":"https://api.github.com/users/amcrawford/followers","following_url":"https://api.github.com/users/amcrawford/following{/other_user}","gists_url":"https://api.github.com/users/amcrawford/gists{/gist_id}","starred_url":"https://api.github.com/users/amcrawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcrawford/subscriptions","organizations_url":"https://api.github.com/users/amcrawford/orgs","repos_url":"https://api.github.com/users/amcrawford/repos","events_url":"https://api.github.com/users/amcrawford/events{/privacy}","received_events_url":"https://api.github.com/users/amcrawford/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amcrawford/slota-shop","description":"","fork":false,"url":"https://api.github.com/repos/amcrawford/slota-shop","forks_url":"https://api.github.com/repos/amcrawford/slota-shop/forks","keys_url":"https://api.github.com/repos/amcrawford/slota-shop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amcrawford/slota-shop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amcrawford/slota-shop/teams","hooks_url":"https://api.github.com/repos/amcrawford/slota-shop/hooks","issue_events_url":"https://api.github.com/repos/amcrawford/slota-shop/issues/events{/number}","events_url":"https://api.github.com/repos/amcrawford/slota-shop/events","assignees_url":"https://api.github.com/repos/amcrawford/slota-shop/assignees{/user}","branches_url":"https://api.github.com/repos/amcrawford/slota-shop/branches{/branch}","tags_url":"https://api.github.com/repos/amcrawford/slota-shop/tags","blobs_url":"https://api.github.com/repos/amcrawford/slota-shop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amcrawford/slota-shop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amcrawford/slota-shop/git/refs{/sha}","trees_url":"https://api.github.com/repos/amcrawford/slota-shop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amcrawford/slota-shop/statuses/{sha}","languages_url":"https://api.github.com/repos/amcrawford/slota-shop/languages","stargazers_url":"https://api.github.com/repos/amcrawford/slota-shop/stargazers","contributors_url":"https://api.github.com/repos/amcrawford/slota-shop/contributors","subscribers_url":"https://api.github.com/repos/amcrawford/slota-shop/subscribers","subscription_url":"https://api.github.com/repos/amcrawford/slota-shop/subscription","commits_url":"https://api.github.com/repos/amcrawford/slota-shop/commits{/sha}","git_commits_url":"https://api.github.com/repos/amcrawford/slota-shop/git/commits{/sha}","comments_url":"https://api.github.com/repos/amcrawford/slota-shop/comments{/number}","issue_comment_url":"https://api.github.com/repos/amcrawford/slota-shop/issues/comments{/number}","contents_url":"https://api.github.com/repos/amcrawford/slota-shop/contents/{+path}","compare_url":"https://api.github.com/repos/amcrawford/slota-shop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amcrawford/slota-shop/merges","archive_url":"https://api.github.com/repos/amcrawford/slota-shop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amcrawford/slota-shop/downloads","issues_url":"https://api.github.com/repos/amcrawford/slota-shop/issues{/number}","pulls_url":"https://api.github.com/repos/amcrawford/slota-shop/pulls{/number}","milestones_url":"https://api.github.com/repos/amcrawford/slota-shop/milestones{/number}","notifications_url":"https://api.github.com/repos/amcrawford/slota-shop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amcrawford/slota-shop/labels{/name}","releases_url":"https://api.github.com/repos/amcrawford/slota-shop/releases{/id}","created_at":"2015-11-09T17:42:58Z","updated_at":"2015-11-12T20:19:13Z","pushed_at":"2015-11-13T00:01:39Z","git_url":"git://github.com/amcrawford/slota-shop.git","ssh_url":"git@github.com:amcrawford/slota-shop.git","clone_url":"https://github.com/amcrawford/slota-shop.git","svn_url":"https://github.com/amcrawford/slota-shop","homepage":null,"size":512,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":19,"forks":0,"open_issues":19,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amcrawford/slota-shop/pulls/63"},"html":{"href":"https://github.com/amcrawford/slota-shop/pull/63"},"issue":{"href":"https://api.github.com/repos/amcrawford/slota-shop/issues/63"},"comments":{"href":"https://api.github.com/repos/amcrawford/slota-shop/issues/63/comments"},"review_comments":{"href":"https://api.github.com/repos/amcrawford/slota-shop/pulls/63/comments"},"review_comment":{"href":"https://api.github.com/repos/amcrawford/slota-shop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amcrawford/slota-shop/pulls/63/commits"},"statuses":{"href":"https://api.github.com/repos/amcrawford/slota-shop/statuses/3e0092aac2f5ac28cde685b3ba793b5872a74186"}}}}