{"action":"created","comment":{"url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/comments/34161122","id":34161122,"diff_hunk":"@@ -0,0 +1,71 @@\n+require \"spec_helper\"\n+\n+describe PingController do\n+\n+  context 'User database unavailable' do\n+    before do\n+      User::Data.stub(:database_alive?).and_return(false)\n+      CampusOracle::Queries.stub(:database_alive?).and_return(true)\n+    end\n+    it 'raises error' do\n+      get :do\n+      expect {raise 'CalCentral database is currently unavailable'}.to raise_error('CalCentral database is currently unavailable')\n+      expect(response.status).to eq 503\n+    end\n+  end\n+\n+  context 'Campus database unavailable' do\n+    before do\n+      User::Data.stub(:database_alive?).and_return(true)\n+      CampusOracle::Queries.stub(:database_alive?).and_return(false)\n+    end\n+    it 'raises error' do\n+      get :do\n+      expect {raise 'Campus database is currently unavailable'}.to raise_error('Campus database is currently unavailable')","path":"spec/controllers/ping_controller_spec.rb","position":24,"original_position":24,"commit_id":"0183fbde308b8a04929046adec83ee5a1ab53863","original_commit_id":"0183fbde308b8a04929046adec83ee5a1ab53863","user":{"login":"ctweney","id":453309,"avatar_url":"https://avatars.githubusercontent.com/u/453309?v=3","gravatar_id":"","url":"https://api.github.com/users/ctweney","html_url":"https://github.com/ctweney","followers_url":"https://api.github.com/users/ctweney/followers","following_url":"https://api.github.com/users/ctweney/following{/other_user}","gists_url":"https://api.github.com/users/ctweney/gists{/gist_id}","starred_url":"https://api.github.com/users/ctweney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctweney/subscriptions","organizations_url":"https://api.github.com/users/ctweney/orgs","repos_url":"https://api.github.com/users/ctweney/repos","events_url":"https://api.github.com/users/ctweney/events{/privacy}","received_events_url":"https://api.github.com/users/ctweney/received_events","type":"User","site_admin":false},"body":"Same as above expect-raise block. ","created_at":"2015-07-08T15:29:43Z","updated_at":"2015-07-08T15:29:43Z","html_url":"https://github.com/ets-berkeley-edu/calcentral/pull/3991#discussion_r34161122","pull_request_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/3991","_links":{"self":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/comments/34161122"},"html":{"href":"https://github.com/ets-berkeley-edu/calcentral/pull/3991#discussion_r34161122"},"pull_request":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/3991"}}},"pull_request":{"url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/3991","id":39422526,"html_url":"https://github.com/ets-berkeley-edu/calcentral/pull/3991","diff_url":"https://github.com/ets-berkeley-edu/calcentral/pull/3991.diff","patch_url":"https://github.com/ets-berkeley-edu/calcentral/pull/3991.patch","issue_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/3991","number":3991,"state":"open","locked":false,"title":"SISRP-4446 - Write spec to cover ping_controller","user":{"login":"Shuotong","id":7134567,"avatar_url":"https://avatars.githubusercontent.com/u/7134567?v=3","gravatar_id":"","url":"https://api.github.com/users/Shuotong","html_url":"https://github.com/Shuotong","followers_url":"https://api.github.com/users/Shuotong/followers","following_url":"https://api.github.com/users/Shuotong/following{/other_user}","gists_url":"https://api.github.com/users/Shuotong/gists{/gist_id}","starred_url":"https://api.github.com/users/Shuotong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shuotong/subscriptions","organizations_url":"https://api.github.com/users/Shuotong/orgs","repos_url":"https://api.github.com/users/Shuotong/repos","events_url":"https://api.github.com/users/Shuotong/events{/privacy}","received_events_url":"https://api.github.com/users/Shuotong/received_events","type":"User","site_admin":false},"body":"https://jira.berkeley.edu/browse/SISRP-4446","created_at":"2015-07-07T22:10:20Z","updated_at":"2015-07-08T15:29:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1447b287541b5f561e8c6926f46e7ace865f6d70","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/3991/commits","review_comments_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/3991/comments","review_comment_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/3991/comments","statuses_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/statuses/0183fbde308b8a04929046adec83ee5a1ab53863","head":{"label":"Shuotong:SISRP-4446","ref":"SISRP-4446","sha":"0183fbde308b8a04929046adec83ee5a1ab53863","user":{"login":"Shuotong","id":7134567,"avatar_url":"https://avatars.githubusercontent.com/u/7134567?v=3","gravatar_id":"","url":"https://api.github.com/users/Shuotong","html_url":"https://github.com/Shuotong","followers_url":"https://api.github.com/users/Shuotong/followers","following_url":"https://api.github.com/users/Shuotong/following{/other_user}","gists_url":"https://api.github.com/users/Shuotong/gists{/gist_id}","starred_url":"https://api.github.com/users/Shuotong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shuotong/subscriptions","organizations_url":"https://api.github.com/users/Shuotong/orgs","repos_url":"https://api.github.com/users/Shuotong/repos","events_url":"https://api.github.com/users/Shuotong/events{/privacy}","received_events_url":"https://api.github.com/users/Shuotong/received_events","type":"User","site_admin":false},"repo":{"id":34927884,"name":"calcentral","full_name":"Shuotong/calcentral","owner":{"login":"Shuotong","id":7134567,"avatar_url":"https://avatars.githubusercontent.com/u/7134567?v=3","gravatar_id":"","url":"https://api.github.com/users/Shuotong","html_url":"https://github.com/Shuotong","followers_url":"https://api.github.com/users/Shuotong/followers","following_url":"https://api.github.com/users/Shuotong/following{/other_user}","gists_url":"https://api.github.com/users/Shuotong/gists{/gist_id}","starred_url":"https://api.github.com/users/Shuotong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shuotong/subscriptions","organizations_url":"https://api.github.com/users/Shuotong/orgs","repos_url":"https://api.github.com/users/Shuotong/repos","events_url":"https://api.github.com/users/Shuotong/events{/privacy}","received_events_url":"https://api.github.com/users/Shuotong/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Shuotong/calcentral","description":"","fork":true,"url":"https://api.github.com/repos/Shuotong/calcentral","forks_url":"https://api.github.com/repos/Shuotong/calcentral/forks","keys_url":"https://api.github.com/repos/Shuotong/calcentral/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shuotong/calcentral/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shuotong/calcentral/teams","hooks_url":"https://api.github.com/repos/Shuotong/calcentral/hooks","issue_events_url":"https://api.github.com/repos/Shuotong/calcentral/issues/events{/number}","events_url":"https://api.github.com/repos/Shuotong/calcentral/events","assignees_url":"https://api.github.com/repos/Shuotong/calcentral/assignees{/user}","branches_url":"https://api.github.com/repos/Shuotong/calcentral/branches{/branch}","tags_url":"https://api.github.com/repos/Shuotong/calcentral/tags","blobs_url":"https://api.github.com/repos/Shuotong/calcentral/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shuotong/calcentral/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shuotong/calcentral/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shuotong/calcentral/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shuotong/calcentral/statuses/{sha}","languages_url":"https://api.github.com/repos/Shuotong/calcentral/languages","stargazers_url":"https://api.github.com/repos/Shuotong/calcentral/stargazers","contributors_url":"https://api.github.com/repos/Shuotong/calcentral/contributors","subscribers_url":"https://api.github.com/repos/Shuotong/calcentral/subscribers","subscription_url":"https://api.github.com/repos/Shuotong/calcentral/subscription","commits_url":"https://api.github.com/repos/Shuotong/calcentral/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shuotong/calcentral/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shuotong/calcentral/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shuotong/calcentral/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shuotong/calcentral/contents/{+path}","compare_url":"https://api.github.com/repos/Shuotong/calcentral/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shuotong/calcentral/merges","archive_url":"https://api.github.com/repos/Shuotong/calcentral/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shuotong/calcentral/downloads","issues_url":"https://api.github.com/repos/Shuotong/calcentral/issues{/number}","pulls_url":"https://api.github.com/repos/Shuotong/calcentral/pulls{/number}","milestones_url":"https://api.github.com/repos/Shuotong/calcentral/milestones{/number}","notifications_url":"https://api.github.com/repos/Shuotong/calcentral/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shuotong/calcentral/labels{/name}","releases_url":"https://api.github.com/repos/Shuotong/calcentral/releases{/id}","created_at":"2015-05-01T22:56:29Z","updated_at":"2015-05-01T22:56:32Z","pushed_at":"2015-07-07T23:24:55Z","git_url":"git://github.com/Shuotong/calcentral.git","ssh_url":"git@github.com:Shuotong/calcentral.git","clone_url":"https://github.com/Shuotong/calcentral.git","svn_url":"https://github.com/Shuotong/calcentral","homepage":"https://calcentral.berkeley.edu","size":19383,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"ets-berkeley-edu:master","ref":"master","sha":"c7e14444cac490c970b80bd199a2d131229e4d29","user":{"login":"ets-berkeley-edu","id":283538,"avatar_url":"https://avatars.githubusercontent.com/u/283538?v=3","gravatar_id":"","url":"https://api.github.com/users/ets-berkeley-edu","html_url":"https://github.com/ets-berkeley-edu","followers_url":"https://api.github.com/users/ets-berkeley-edu/followers","following_url":"https://api.github.com/users/ets-berkeley-edu/following{/other_user}","gists_url":"https://api.github.com/users/ets-berkeley-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/ets-berkeley-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ets-berkeley-edu/subscriptions","organizations_url":"https://api.github.com/users/ets-berkeley-edu/orgs","repos_url":"https://api.github.com/users/ets-berkeley-edu/repos","events_url":"https://api.github.com/users/ets-berkeley-edu/events{/privacy}","received_events_url":"https://api.github.com/users/ets-berkeley-edu/received_events","type":"Organization","site_admin":false},"repo":{"id":5483921,"name":"calcentral","full_name":"ets-berkeley-edu/calcentral","owner":{"login":"ets-berkeley-edu","id":283538,"avatar_url":"https://avatars.githubusercontent.com/u/283538?v=3","gravatar_id":"","url":"https://api.github.com/users/ets-berkeley-edu","html_url":"https://github.com/ets-berkeley-edu","followers_url":"https://api.github.com/users/ets-berkeley-edu/followers","following_url":"https://api.github.com/users/ets-berkeley-edu/following{/other_user}","gists_url":"https://api.github.com/users/ets-berkeley-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/ets-berkeley-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ets-berkeley-edu/subscriptions","organizations_url":"https://api.github.com/users/ets-berkeley-edu/orgs","repos_url":"https://api.github.com/users/ets-berkeley-edu/repos","events_url":"https://api.github.com/users/ets-berkeley-edu/events{/privacy}","received_events_url":"https://api.github.com/users/ets-berkeley-edu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ets-berkeley-edu/calcentral","description":"","fork":false,"url":"https://api.github.com/repos/ets-berkeley-edu/calcentral","forks_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/forks","keys_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/teams","hooks_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/hooks","issue_events_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/events{/number}","events_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/events","assignees_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/assignees{/user}","branches_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/branches{/branch}","tags_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/tags","blobs_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/refs{/sha}","trees_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/statuses/{sha}","languages_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/languages","stargazers_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/stargazers","contributors_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/contributors","subscribers_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/subscribers","subscription_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/subscription","commits_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/commits{/sha}","git_commits_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/commits{/sha}","comments_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/comments{/number}","issue_comment_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/comments{/number}","contents_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/contents/{+path}","compare_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/merges","archive_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/downloads","issues_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues{/number}","pulls_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls{/number}","milestones_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/milestones{/number}","notifications_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/labels{/name}","releases_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/releases{/id}","created_at":"2012-08-20T16:45:39Z","updated_at":"2015-06-25T20:49:55Z","pushed_at":"2015-07-08T15:20:21Z","git_url":"git://github.com/ets-berkeley-edu/calcentral.git","ssh_url":"git@github.com:ets-berkeley-edu/calcentral.git","clone_url":"https://github.com/ets-berkeley-edu/calcentral.git","svn_url":"https://github.com/ets-berkeley-edu/calcentral","homepage":"https://calcentral.berkeley.edu","size":34912,"stargazers_count":48,"watchers_count":48,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":3,"forks":56,"open_issues":3,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/3991"},"html":{"href":"https://github.com/ets-berkeley-edu/calcentral/pull/3991"},"issue":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/3991"},"comments":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/3991/comments"},"review_comments":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/3991/comments"},"review_comment":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/3991/commits"},"statuses":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/statuses/0183fbde308b8a04929046adec83ee5a1ab53863"}}}}