{"action":"created","comment":{"url":"https://api.github.com/repos/mysociety/alaveteli/pulls/comments/136949559","pull_request_review_id":60555564,"id":136949559,"diff_hunk":"@@ -0,0 +1,67 @@\n+# -*- encoding : utf-8 -*-\n+require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')\n+require 'stripe_mock'\n+\n+describe AlaveteliPro::PlansController do\n+  before { StripeMock.start }\n+  after { StripeMock.stop }\n+  let(:stripe_helper) { StripeMock.create_test_helper }\n+  let!(:pro_plan) { stripe_helper.create_plan(id: 'pro', amount: 1000) }\n+\n+  describe 'GET #show' do\n+\n+    context 'without a signed-in user' do\n+\n+      before do\n+        get :show, id: 'pro'\n+      end\n+\n+      it 'redirects to the login form' do\n+        expect(response).\n+          to redirect_to(signin_path(:token => PostRedirect.last.token))\n+      end\n+\n+    end\n+\n+    context 'with a signed-in user' do\n+      let(:user) { FactoryGirl.create(:user) }\n+\n+      before do\n+        session[:user_id] = user.id\n+      end\n+\n+","path":"spec/controllers/alaveteli_pro/plans_controller_spec.rb","position":33,"original_position":33,"commit_id":"afd31359a001e6e7fc1b724bab84faeecccbaf42","original_commit_id":"afd31359a001e6e7fc1b724bab84faeecccbaf42","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Extra blank line detected.","created_at":"2017-09-05T10:25:27Z","updated_at":"2017-09-05T10:25:27Z","html_url":"https://github.com/mysociety/alaveteli/pull/4190#discussion_r136949559","pull_request_url":"https://api.github.com/repos/mysociety/alaveteli/pulls/4190","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/comments/136949559"},"html":{"href":"https://github.com/mysociety/alaveteli/pull/4190#discussion_r136949559"},"pull_request":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/4190"}}},"pull_request":{"url":"https://api.github.com/repos/mysociety/alaveteli/pulls/4190","id":138169214,"html_url":"https://github.com/mysociety/alaveteli/pull/4190","diff_url":"https://github.com/mysociety/alaveteli/pull/4190.diff","patch_url":"https://github.com/mysociety/alaveteli/pull/4190.patch","issue_url":"https://api.github.com/repos/mysociety/alaveteli/issues/4190","number":4190,"state":"open","locked":false,"title":"[WIP][#Pro337] Payment page","user":{"login":"garethrees","id":282788,"avatar_url":"https://avatars1.githubusercontent.com/u/282788?v=4","gravatar_id":"","url":"https://api.github.com/users/garethrees","html_url":"https://github.com/garethrees","followers_url":"https://api.github.com/users/garethrees/followers","following_url":"https://api.github.com/users/garethrees/following{/other_user}","gists_url":"https://api.github.com/users/garethrees/gists{/gist_id}","starred_url":"https://api.github.com/users/garethrees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garethrees/subscriptions","organizations_url":"https://api.github.com/users/garethrees/orgs","repos_url":"https://api.github.com/users/garethrees/repos","events_url":"https://api.github.com/users/garethrees/events{/privacy}","received_events_url":"https://api.github.com/users/garethrees/received_events","type":"User","site_admin":false},"body":"![pro-payments](https://user-images.githubusercontent.com/282788/29821436-d3dc76c6-8cbf-11e7-9538-476da61cde60.gif)\r\n\r\nWork on https://github.com/mysociety/alaveteli-professional/issues/337.\r\n\r\nTODO:\r\n\r\n- [x] Finish calculating prices as Plan Price + VAT\r\n- [ ] Handle Stripe exceptions\r\n- [x] Constrain payment routes by feature flag\r\n- [ ] Prevent user signing up to the same plan twice\r\n- [ ] Handle invalid plan (e.g. `/plans/iqwecb`)","created_at":"2017-08-29T12:42:39Z","updated_at":"2017-09-05T10:25:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c528a2a5a59a0e0f4aa20e8f48e8ee87a2e3639","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/mysociety/alaveteli/pulls/4190/commits","review_comments_url":"https://api.github.com/repos/mysociety/alaveteli/pulls/4190/comments","review_comment_url":"https://api.github.com/repos/mysociety/alaveteli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mysociety/alaveteli/issues/4190/comments","statuses_url":"https://api.github.com/repos/mysociety/alaveteli/statuses/afd31359a001e6e7fc1b724bab84faeecccbaf42","head":{"label":"mysociety:pro337-payment-page","ref":"pro337-payment-page","sha":"afd31359a001e6e7fc1b724bab84faeecccbaf42","user":{"login":"mysociety","id":141338,"avatar_url":"https://avatars1.githubusercontent.com/u/141338?v=4","gravatar_id":"","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"repo":{"id":1125389,"name":"alaveteli","full_name":"mysociety/alaveteli","owner":{"login":"mysociety","id":141338,"avatar_url":"https://avatars1.githubusercontent.com/u/141338?v=4","gravatar_id":"","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mysociety/alaveteli","description":"Provide a Freedom of Information request system for your jurisdiction","fork":false,"url":"https://api.github.com/repos/mysociety/alaveteli","forks_url":"https://api.github.com/repos/mysociety/alaveteli/forks","keys_url":"https://api.github.com/repos/mysociety/alaveteli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mysociety/alaveteli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mysociety/alaveteli/teams","hooks_url":"https://api.github.com/repos/mysociety/alaveteli/hooks","issue_events_url":"https://api.github.com/repos/mysociety/alaveteli/issues/events{/number}","events_url":"https://api.github.com/repos/mysociety/alaveteli/events","assignees_url":"https://api.github.com/repos/mysociety/alaveteli/assignees{/user}","branches_url":"https://api.github.com/repos/mysociety/alaveteli/branches{/branch}","tags_url":"https://api.github.com/repos/mysociety/alaveteli/tags","blobs_url":"https://api.github.com/repos/mysociety/alaveteli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mysociety/alaveteli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mysociety/alaveteli/git/refs{/sha}","trees_url":"https://api.github.com/repos/mysociety/alaveteli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mysociety/alaveteli/statuses/{sha}","languages_url":"https://api.github.com/repos/mysociety/alaveteli/languages","stargazers_url":"https://api.github.com/repos/mysociety/alaveteli/stargazers","contributors_url":"https://api.github.com/repos/mysociety/alaveteli/contributors","subscribers_url":"https://api.github.com/repos/mysociety/alaveteli/subscribers","subscription_url":"https://api.github.com/repos/mysociety/alaveteli/subscription","commits_url":"https://api.github.com/repos/mysociety/alaveteli/commits{/sha}","git_commits_url":"https://api.github.com/repos/mysociety/alaveteli/git/commits{/sha}","comments_url":"https://api.github.com/repos/mysociety/alaveteli/comments{/number}","issue_comment_url":"https://api.github.com/repos/mysociety/alaveteli/issues/comments{/number}","contents_url":"https://api.github.com/repos/mysociety/alaveteli/contents/{+path}","compare_url":"https://api.github.com/repos/mysociety/alaveteli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mysociety/alaveteli/merges","archive_url":"https://api.github.com/repos/mysociety/alaveteli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mysociety/alaveteli/downloads","issues_url":"https://api.github.com/repos/mysociety/alaveteli/issues{/number}","pulls_url":"https://api.github.com/repos/mysociety/alaveteli/pulls{/number}","milestones_url":"https://api.github.com/repos/mysociety/alaveteli/milestones{/number}","notifications_url":"https://api.github.com/repos/mysociety/alaveteli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mysociety/alaveteli/labels{/name}","releases_url":"https://api.github.com/repos/mysociety/alaveteli/releases{/id}","deployments_url":"https://api.github.com/repos/mysociety/alaveteli/deployments","created_at":"2010-11-30T13:11:39Z","updated_at":"2017-08-27T18:11:19Z","pushed_at":"2017-09-05T10:25:13Z","git_url":"git://github.com/mysociety/alaveteli.git","ssh_url":"git@github.com:mysociety/alaveteli.git","clone_url":"https://github.com/mysociety/alaveteli.git","svn_url":"https://github.com/mysociety/alaveteli","homepage":"http://alaveteli.org","size":108645,"stargazers_count":210,"watchers_count":210,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":136,"mirror_url":null,"open_issues_count":846,"forks":136,"open_issues":846,"watchers":210,"default_branch":"develop"}},"base":{"label":"mysociety:develop","ref":"develop","sha":"8ee997e46255ca4c7250d865209e00f700f0735a","user":{"login":"mysociety","id":141338,"avatar_url":"https://avatars1.githubusercontent.com/u/141338?v=4","gravatar_id":"","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"repo":{"id":1125389,"name":"alaveteli","full_name":"mysociety/alaveteli","owner":{"login":"mysociety","id":141338,"avatar_url":"https://avatars1.githubusercontent.com/u/141338?v=4","gravatar_id":"","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mysociety/alaveteli","description":"Provide a Freedom of Information request system for your jurisdiction","fork":false,"url":"https://api.github.com/repos/mysociety/alaveteli","forks_url":"https://api.github.com/repos/mysociety/alaveteli/forks","keys_url":"https://api.github.com/repos/mysociety/alaveteli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mysociety/alaveteli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mysociety/alaveteli/teams","hooks_url":"https://api.github.com/repos/mysociety/alaveteli/hooks","issue_events_url":"https://api.github.com/repos/mysociety/alaveteli/issues/events{/number}","events_url":"https://api.github.com/repos/mysociety/alaveteli/events","assignees_url":"https://api.github.com/repos/mysociety/alaveteli/assignees{/user}","branches_url":"https://api.github.com/repos/mysociety/alaveteli/branches{/branch}","tags_url":"https://api.github.com/repos/mysociety/alaveteli/tags","blobs_url":"https://api.github.com/repos/mysociety/alaveteli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mysociety/alaveteli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mysociety/alaveteli/git/refs{/sha}","trees_url":"https://api.github.com/repos/mysociety/alaveteli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mysociety/alaveteli/statuses/{sha}","languages_url":"https://api.github.com/repos/mysociety/alaveteli/languages","stargazers_url":"https://api.github.com/repos/mysociety/alaveteli/stargazers","contributors_url":"https://api.github.com/repos/mysociety/alaveteli/contributors","subscribers_url":"https://api.github.com/repos/mysociety/alaveteli/subscribers","subscription_url":"https://api.github.com/repos/mysociety/alaveteli/subscription","commits_url":"https://api.github.com/repos/mysociety/alaveteli/commits{/sha}","git_commits_url":"https://api.github.com/repos/mysociety/alaveteli/git/commits{/sha}","comments_url":"https://api.github.com/repos/mysociety/alaveteli/comments{/number}","issue_comment_url":"https://api.github.com/repos/mysociety/alaveteli/issues/comments{/number}","contents_url":"https://api.github.com/repos/mysociety/alaveteli/contents/{+path}","compare_url":"https://api.github.com/repos/mysociety/alaveteli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mysociety/alaveteli/merges","archive_url":"https://api.github.com/repos/mysociety/alaveteli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mysociety/alaveteli/downloads","issues_url":"https://api.github.com/repos/mysociety/alaveteli/issues{/number}","pulls_url":"https://api.github.com/repos/mysociety/alaveteli/pulls{/number}","milestones_url":"https://api.github.com/repos/mysociety/alaveteli/milestones{/number}","notifications_url":"https://api.github.com/repos/mysociety/alaveteli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mysociety/alaveteli/labels{/name}","releases_url":"https://api.github.com/repos/mysociety/alaveteli/releases{/id}","deployments_url":"https://api.github.com/repos/mysociety/alaveteli/deployments","created_at":"2010-11-30T13:11:39Z","updated_at":"2017-08-27T18:11:19Z","pushed_at":"2017-09-05T10:25:13Z","git_url":"git://github.com/mysociety/alaveteli.git","ssh_url":"git@github.com:mysociety/alaveteli.git","clone_url":"https://github.com/mysociety/alaveteli.git","svn_url":"https://github.com/mysociety/alaveteli","homepage":"http://alaveteli.org","size":108645,"stargazers_count":210,"watchers_count":210,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":136,"mirror_url":null,"open_issues_count":846,"forks":136,"open_issues":846,"watchers":210,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/4190"},"html":{"href":"https://github.com/mysociety/alaveteli/pull/4190"},"issue":{"href":"https://api.github.com/repos/mysociety/alaveteli/issues/4190"},"comments":{"href":"https://api.github.com/repos/mysociety/alaveteli/issues/4190/comments"},"review_comments":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/4190/comments"},"review_comment":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/4190/commits"},"statuses":{"href":"https://api.github.com/repos/mysociety/alaveteli/statuses/afd31359a001e6e7fc1b724bab84faeecccbaf42"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"houndci-bot"}}