{"action":"created","comment":{"url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/comments/63185931","id":63185931,"diff_hunk":"@@ -161,6 +161,19 @@\n       patch :update, id: registration.id, registration: { status: :accepted }\n       expect(registration.reload.accepted?).to eq true\n     end\n+\n+    it \"can register for their own competition that is not yet visible\" do\n+      competition.update_column(:showAtAll, false)\n+      competition.save!\n+      expect(RegistrationsMailer).to receive(:notify_organizers_of_new_registration).and_call_original\n+      expect(RegistrationsMailer).to receive(:notify_registrant_of_new_registration).and_call_original","path":"WcaOnRails/spec/controllers/registrations_controller_spec.rb","position":9,"original_position":9,"commit_id":"7df2b4c250efb29af38049156fa7b27aa2218c04","original_commit_id":"7df2b4c250efb29af38049156fa7b27aa2218c04","user":{"login":"jonatanklosko","id":17034772,"avatar_url":"https://avatars.githubusercontent.com/u/17034772?v=3","gravatar_id":"","url":"https://api.github.com/users/jonatanklosko","html_url":"https://github.com/jonatanklosko","followers_url":"https://api.github.com/users/jonatanklosko/followers","following_url":"https://api.github.com/users/jonatanklosko/following{/other_user}","gists_url":"https://api.github.com/users/jonatanklosko/gists{/gist_id}","starred_url":"https://api.github.com/users/jonatanklosko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonatanklosko/subscriptions","organizations_url":"https://api.github.com/users/jonatanklosko/orgs","repos_url":"https://api.github.com/users/jonatanklosko/repos","events_url":"https://api.github.com/users/jonatanklosko/events{/privacy}","received_events_url":"https://api.github.com/users/jonatanklosko/received_events","type":"User","site_admin":false},"body":"Shouldn't this go below `post :create`?","created_at":"2016-05-13T13:53:05Z","updated_at":"2016-05-13T13:53:05Z","html_url":"https://github.com/cubing/worldcubeassociation.org/pull/610#discussion_r63185931","pull_request_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/610","_links":{"self":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/comments/63185931"},"html":{"href":"https://github.com/cubing/worldcubeassociation.org/pull/610#discussion_r63185931"},"pull_request":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/610"}}},"pull_request":{"url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/610","id":69991759,"html_url":"https://github.com/cubing/worldcubeassociation.org/pull/610","diff_url":"https://github.com/cubing/worldcubeassociation.org/pull/610.diff","patch_url":"https://github.com/cubing/worldcubeassociation.org/pull/610.patch","issue_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/610","number":610,"state":"open","locked":false,"title":"Tests added to check a user can't register for an invisible comp - Fixes #415","user":{"login":"pingskills","id":4403168,"avatar_url":"https://avatars.githubusercontent.com/u/4403168?v=3","gravatar_id":"","url":"https://api.github.com/users/pingskills","html_url":"https://github.com/pingskills","followers_url":"https://api.github.com/users/pingskills/followers","following_url":"https://api.github.com/users/pingskills/following{/other_user}","gists_url":"https://api.github.com/users/pingskills/gists{/gist_id}","starred_url":"https://api.github.com/users/pingskills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingskills/subscriptions","organizations_url":"https://api.github.com/users/pingskills/orgs","repos_url":"https://api.github.com/users/pingskills/repos","events_url":"https://api.github.com/users/pingskills/events{/privacy}","received_events_url":"https://api.github.com/users/pingskills/received_events","type":"User","site_admin":false},"body":"I added 2 tests to registrations_controller_spec.rb\r\n\r\n1. Ensure a competitor cannot register for an invisible competition\r\n2. Ensure an organizer can register for their own competition.\r\n\r\nAn organizer still gets a message informing them that this competition is not visible to the public as follows:\r\n![image](https://cloud.githubusercontent.com/assets/4403168/15248520/00e54282-195e-11e6-9c2d-dcec95600473.png)\r\n\r\nNote that there seems to be a bug with the alert function in app/helpers/application_helper.rb as you can see from the image above where the `<strong>` tag is rendered with escaped <> characters and not as a html tag.","created_at":"2016-05-13T13:00:06Z","updated_at":"2016-05-13T13:53:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e73a6f798fe99f43a267325b6bc797f4691ca4d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/610/commits","review_comments_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/610/comments","review_comment_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/610/comments","statuses_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/statuses/7df2b4c250efb29af38049156fa7b27aa2218c04","head":{"label":"pingskills:iss415","ref":"iss415","sha":"7df2b4c250efb29af38049156fa7b27aa2218c04","user":{"login":"pingskills","id":4403168,"avatar_url":"https://avatars.githubusercontent.com/u/4403168?v=3","gravatar_id":"","url":"https://api.github.com/users/pingskills","html_url":"https://github.com/pingskills","followers_url":"https://api.github.com/users/pingskills/followers","following_url":"https://api.github.com/users/pingskills/following{/other_user}","gists_url":"https://api.github.com/users/pingskills/gists{/gist_id}","starred_url":"https://api.github.com/users/pingskills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingskills/subscriptions","organizations_url":"https://api.github.com/users/pingskills/orgs","repos_url":"https://api.github.com/users/pingskills/repos","events_url":"https://api.github.com/users/pingskills/events{/privacy}","received_events_url":"https://api.github.com/users/pingskills/received_events","type":"User","site_admin":false},"repo":{"id":56292449,"name":"worldcubeassociation.org","full_name":"pingskills/worldcubeassociation.org","owner":{"login":"pingskills","id":4403168,"avatar_url":"https://avatars.githubusercontent.com/u/4403168?v=3","gravatar_id":"","url":"https://api.github.com/users/pingskills","html_url":"https://github.com/pingskills","followers_url":"https://api.github.com/users/pingskills/followers","following_url":"https://api.github.com/users/pingskills/following{/other_user}","gists_url":"https://api.github.com/users/pingskills/gists{/gist_id}","starred_url":"https://api.github.com/users/pingskills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingskills/subscriptions","organizations_url":"https://api.github.com/users/pingskills/orgs","repos_url":"https://api.github.com/users/pingskills/repos","events_url":"https://api.github.com/users/pingskills/events{/privacy}","received_events_url":"https://api.github.com/users/pingskills/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pingskills/worldcubeassociation.org","description":"[WCA Project] All of the code that runs on worldcubeassociation.org","fork":true,"url":"https://api.github.com/repos/pingskills/worldcubeassociation.org","forks_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/forks","keys_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/teams","hooks_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/hooks","issue_events_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/issues/events{/number}","events_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/events","assignees_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/assignees{/user}","branches_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/branches{/branch}","tags_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/tags","blobs_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/statuses/{sha}","languages_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/languages","stargazers_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/stargazers","contributors_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/contributors","subscribers_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/subscribers","subscription_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/subscription","commits_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/contents/{+path}","compare_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/merges","archive_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/downloads","issues_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/issues{/number}","pulls_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/pulls{/number}","milestones_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/milestones{/number}","notifications_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/labels{/name}","releases_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/releases{/id}","deployments_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/deployments","created_at":"2016-04-15T05:05:13Z","updated_at":"2016-04-15T05:05:21Z","pushed_at":"2016-05-13T12:31:20Z","git_url":"git://github.com/pingskills/worldcubeassociation.org.git","ssh_url":"git@github.com:pingskills/worldcubeassociation.org.git","clone_url":"https://github.com/pingskills/worldcubeassociation.org.git","svn_url":"https://github.com/pingskills/worldcubeassociation.org","homepage":"https://www.worldcubeassociation.org/","size":54718,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cubing:master","ref":"master","sha":"2f0ecc1cd307e5aa8819d938c103b34a45317d59","user":{"login":"cubing","id":1092267,"avatar_url":"https://avatars.githubusercontent.com/u/1092267?v=3","gravatar_id":"","url":"https://api.github.com/users/cubing","html_url":"https://github.com/cubing","followers_url":"https://api.github.com/users/cubing/followers","following_url":"https://api.github.com/users/cubing/following{/other_user}","gists_url":"https://api.github.com/users/cubing/gists{/gist_id}","starred_url":"https://api.github.com/users/cubing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cubing/subscriptions","organizations_url":"https://api.github.com/users/cubing/orgs","repos_url":"https://api.github.com/users/cubing/repos","events_url":"https://api.github.com/users/cubing/events{/privacy}","received_events_url":"https://api.github.com/users/cubing/received_events","type":"Organization","site_admin":false},"repo":{"id":34161579,"name":"worldcubeassociation.org","full_name":"cubing/worldcubeassociation.org","owner":{"login":"cubing","id":1092267,"avatar_url":"https://avatars.githubusercontent.com/u/1092267?v=3","gravatar_id":"","url":"https://api.github.com/users/cubing","html_url":"https://github.com/cubing","followers_url":"https://api.github.com/users/cubing/followers","following_url":"https://api.github.com/users/cubing/following{/other_user}","gists_url":"https://api.github.com/users/cubing/gists{/gist_id}","starred_url":"https://api.github.com/users/cubing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cubing/subscriptions","organizations_url":"https://api.github.com/users/cubing/orgs","repos_url":"https://api.github.com/users/cubing/repos","events_url":"https://api.github.com/users/cubing/events{/privacy}","received_events_url":"https://api.github.com/users/cubing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cubing/worldcubeassociation.org","description":"[WCA Project] All of the code that runs on worldcubeassociation.org","fork":false,"url":"https://api.github.com/repos/cubing/worldcubeassociation.org","forks_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/forks","keys_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/teams","hooks_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/hooks","issue_events_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/events{/number}","events_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/events","assignees_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/assignees{/user}","branches_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/branches{/branch}","tags_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/tags","blobs_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/statuses/{sha}","languages_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/languages","stargazers_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/stargazers","contributors_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/contributors","subscribers_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/subscribers","subscription_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/subscription","commits_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/contents/{+path}","compare_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/merges","archive_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/downloads","issues_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues{/number}","pulls_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls{/number}","milestones_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/milestones{/number}","notifications_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/labels{/name}","releases_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/releases{/id}","deployments_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/deployments","created_at":"2015-04-18T10:21:53Z","updated_at":"2016-05-05T14:39:14Z","pushed_at":"2016-05-13T13:00:07Z","git_url":"git://github.com/cubing/worldcubeassociation.org.git","ssh_url":"git@github.com:cubing/worldcubeassociation.org.git","clone_url":"https://github.com/cubing/worldcubeassociation.org.git","svn_url":"https://github.com/cubing/worldcubeassociation.org","homepage":"https://www.worldcubeassociation.org/","size":54907,"stargazers_count":13,"watchers_count":13,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":146,"forks":26,"open_issues":146,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/610"},"html":{"href":"https://github.com/cubing/worldcubeassociation.org/pull/610"},"issue":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/610"},"comments":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/610/comments"},"review_comments":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/610/comments"},"review_comment":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/610/commits"},"statuses":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/statuses/7df2b4c250efb29af38049156fa7b27aa2218c04"}}}}