{"action":"created","comment":{"url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/pulls/comments/63809996","id":63809996,"diff_hunk":"@@ -2,4 +2,67 @@\n \n RSpec.describe OrganizationsController, type: :controller do\n \n+  let(:user) { FactoryGirl.create(:user) }\n+\n+\n+  describe \"#new\" do\n+    context \"user attempts to create another comapny while having an existing company\" do\n+      let(:organization) { FactoryGirl.create(:organization) }\n+      let(:user) { FactoryGirl.create(:user, organization: organization) }\n+      before { request.session[:user_id] = user.id }\n+\n+      # def invalid_request\n+      #   post :create, organization: FactoryGirl.attributes_for(:organization{})\n+      # end\n+\n+      it \"redirects to the user's organization show page\" do\n+        get :new\n+        expect(response).to redirect_to(organization_path(user.organization_id))","path":"spec/controllers/organizations_controller_spec.rb","position":19,"original_position":19,"commit_id":"92b4cf6d75ef361b3e0bbb29e7c1879a72797ea9","original_commit_id":"92b4cf6d75ef361b3e0bbb29e7c1879a72797ea9","user":{"login":"tkbeili","id":245105,"avatar_url":"https://avatars.githubusercontent.com/u/245105?v=3","gravatar_id":"","url":"https://api.github.com/users/tkbeili","html_url":"https://github.com/tkbeili","followers_url":"https://api.github.com/users/tkbeili/followers","following_url":"https://api.github.com/users/tkbeili/following{/other_user}","gists_url":"https://api.github.com/users/tkbeili/gists{/gist_id}","starred_url":"https://api.github.com/users/tkbeili/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkbeili/subscriptions","organizations_url":"https://api.github.com/users/tkbeili/orgs","repos_url":"https://api.github.com/users/tkbeili/repos","events_url":"https://api.github.com/users/tkbeili/events{/privacy}","received_events_url":"https://api.github.com/users/tkbeili/received_events","type":"User","site_admin":false},"body":"Please use `organization_path(user.organization)` instead","created_at":"2016-05-19T01:18:55Z","updated_at":"2016-05-19T01:18:55Z","html_url":"https://github.com/CodeCoreYVR/vancouvertechhub/pull/1#discussion_r63809996","pull_request_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/pulls/comments/63809996"},"html":{"href":"https://github.com/CodeCoreYVR/vancouvertechhub/pull/1#discussion_r63809996"},"pull_request":{"href":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/pulls/1","id":70614657,"html_url":"https://github.com/CodeCoreYVR/vancouvertechhub/pull/1","diff_url":"https://github.com/CodeCoreYVR/vancouvertechhub/pull/1.diff","patch_url":"https://github.com/CodeCoreYVR/vancouvertechhub/pull/1.patch","issue_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/issues/1","number":1,"state":"open","locked":false,"title":"Fix create organization link","user":{"login":"tjcardoso","id":17835962,"avatar_url":"https://avatars.githubusercontent.com/u/17835962?v=3","gravatar_id":"","url":"https://api.github.com/users/tjcardoso","html_url":"https://github.com/tjcardoso","followers_url":"https://api.github.com/users/tjcardoso/followers","following_url":"https://api.github.com/users/tjcardoso/following{/other_user}","gists_url":"https://api.github.com/users/tjcardoso/gists{/gist_id}","starred_url":"https://api.github.com/users/tjcardoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjcardoso/subscriptions","organizations_url":"https://api.github.com/users/tjcardoso/orgs","repos_url":"https://api.github.com/users/tjcardoso/repos","events_url":"https://api.github.com/users/tjcardoso/events{/privacy}","received_events_url":"https://api.github.com/users/tjcardoso/received_events","type":"User","site_admin":false},"body":"Added logic to the \"create organization\" link in the footer. \r\n\r\nAdded Rspec tests for the functionality of it.","created_at":"2016-05-18T23:14:19Z","updated_at":"2016-05-19T01:18:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4a12030877c3e15fc2ebe755d8656c0a90fc4197","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/pulls/1/commits","review_comments_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/pulls/1/comments","review_comment_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/issues/1/comments","statuses_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/statuses/92b4cf6d75ef361b3e0bbb29e7c1879a72797ea9","head":{"label":"CodeCoreYVR:fix_create_organization_link","ref":"fix_create_organization_link","sha":"92b4cf6d75ef361b3e0bbb29e7c1879a72797ea9","user":{"login":"CodeCoreYVR","id":6611839,"avatar_url":"https://avatars.githubusercontent.com/u/6611839?v=3","gravatar_id":"","url":"https://api.github.com/users/CodeCoreYVR","html_url":"https://github.com/CodeCoreYVR","followers_url":"https://api.github.com/users/CodeCoreYVR/followers","following_url":"https://api.github.com/users/CodeCoreYVR/following{/other_user}","gists_url":"https://api.github.com/users/CodeCoreYVR/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeCoreYVR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeCoreYVR/subscriptions","organizations_url":"https://api.github.com/users/CodeCoreYVR/orgs","repos_url":"https://api.github.com/users/CodeCoreYVR/repos","events_url":"https://api.github.com/users/CodeCoreYVR/events{/privacy}","received_events_url":"https://api.github.com/users/CodeCoreYVR/received_events","type":"Organization","site_admin":false},"repo":{"id":59041940,"name":"vancouvertechhub","full_name":"CodeCoreYVR/vancouvertechhub","owner":{"login":"CodeCoreYVR","id":6611839,"avatar_url":"https://avatars.githubusercontent.com/u/6611839?v=3","gravatar_id":"","url":"https://api.github.com/users/CodeCoreYVR","html_url":"https://github.com/CodeCoreYVR","followers_url":"https://api.github.com/users/CodeCoreYVR/followers","following_url":"https://api.github.com/users/CodeCoreYVR/following{/other_user}","gists_url":"https://api.github.com/users/CodeCoreYVR/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeCoreYVR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeCoreYVR/subscriptions","organizations_url":"https://api.github.com/users/CodeCoreYVR/orgs","repos_url":"https://api.github.com/users/CodeCoreYVR/repos","events_url":"https://api.github.com/users/CodeCoreYVR/events{/privacy}","received_events_url":"https://api.github.com/users/CodeCoreYVR/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CodeCoreYVR/vancouvertechhub","description":"","fork":true,"url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub","forks_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/forks","keys_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/teams","hooks_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/hooks","issue_events_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/issues/events{/number}","events_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/events","assignees_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/assignees{/user}","branches_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/branches{/branch}","tags_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/tags","blobs_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/git/refs{/sha}","trees_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/statuses/{sha}","languages_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/languages","stargazers_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/stargazers","contributors_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/contributors","subscribers_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/subscribers","subscription_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/subscription","commits_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/commits{/sha}","git_commits_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/git/commits{/sha}","comments_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/comments{/number}","issue_comment_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/issues/comments{/number}","contents_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/contents/{+path}","compare_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/merges","archive_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/downloads","issues_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/issues{/number}","pulls_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/pulls{/number}","milestones_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/milestones{/number}","notifications_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/labels{/name}","releases_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/releases{/id}","deployments_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/deployments","created_at":"2016-05-17T16:57:45Z","updated_at":"2016-05-17T16:57:46Z","pushed_at":"2016-05-19T00:53:33Z","git_url":"git://github.com/CodeCoreYVR/vancouvertechhub.git","ssh_url":"git@github.com:CodeCoreYVR/vancouvertechhub.git","clone_url":"https://github.com/CodeCoreYVR/vancouvertechhub.git","svn_url":"https://github.com/CodeCoreYVR/vancouvertechhub","homepage":null,"size":1982,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"CodeCoreYVR:integration","ref":"integration","sha":"3e66a290f8ca3520030e9387d3dbbdd452f2f810","user":{"login":"CodeCoreYVR","id":6611839,"avatar_url":"https://avatars.githubusercontent.com/u/6611839?v=3","gravatar_id":"","url":"https://api.github.com/users/CodeCoreYVR","html_url":"https://github.com/CodeCoreYVR","followers_url":"https://api.github.com/users/CodeCoreYVR/followers","following_url":"https://api.github.com/users/CodeCoreYVR/following{/other_user}","gists_url":"https://api.github.com/users/CodeCoreYVR/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeCoreYVR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeCoreYVR/subscriptions","organizations_url":"https://api.github.com/users/CodeCoreYVR/orgs","repos_url":"https://api.github.com/users/CodeCoreYVR/repos","events_url":"https://api.github.com/users/CodeCoreYVR/events{/privacy}","received_events_url":"https://api.github.com/users/CodeCoreYVR/received_events","type":"Organization","site_admin":false},"repo":{"id":59041940,"name":"vancouvertechhub","full_name":"CodeCoreYVR/vancouvertechhub","owner":{"login":"CodeCoreYVR","id":6611839,"avatar_url":"https://avatars.githubusercontent.com/u/6611839?v=3","gravatar_id":"","url":"https://api.github.com/users/CodeCoreYVR","html_url":"https://github.com/CodeCoreYVR","followers_url":"https://api.github.com/users/CodeCoreYVR/followers","following_url":"https://api.github.com/users/CodeCoreYVR/following{/other_user}","gists_url":"https://api.github.com/users/CodeCoreYVR/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeCoreYVR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeCoreYVR/subscriptions","organizations_url":"https://api.github.com/users/CodeCoreYVR/orgs","repos_url":"https://api.github.com/users/CodeCoreYVR/repos","events_url":"https://api.github.com/users/CodeCoreYVR/events{/privacy}","received_events_url":"https://api.github.com/users/CodeCoreYVR/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CodeCoreYVR/vancouvertechhub","description":"","fork":true,"url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub","forks_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/forks","keys_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/teams","hooks_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/hooks","issue_events_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/issues/events{/number}","events_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/events","assignees_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/assignees{/user}","branches_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/branches{/branch}","tags_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/tags","blobs_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/git/refs{/sha}","trees_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/statuses/{sha}","languages_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/languages","stargazers_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/stargazers","contributors_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/contributors","subscribers_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/subscribers","subscription_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/subscription","commits_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/commits{/sha}","git_commits_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/git/commits{/sha}","comments_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/comments{/number}","issue_comment_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/issues/comments{/number}","contents_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/contents/{+path}","compare_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/merges","archive_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/downloads","issues_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/issues{/number}","pulls_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/pulls{/number}","milestones_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/milestones{/number}","notifications_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/labels{/name}","releases_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/releases{/id}","deployments_url":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/deployments","created_at":"2016-05-17T16:57:45Z","updated_at":"2016-05-17T16:57:46Z","pushed_at":"2016-05-19T00:53:33Z","git_url":"git://github.com/CodeCoreYVR/vancouvertechhub.git","ssh_url":"git@github.com:CodeCoreYVR/vancouvertechhub.git","clone_url":"https://github.com/CodeCoreYVR/vancouvertechhub.git","svn_url":"https://github.com/CodeCoreYVR/vancouvertechhub","homepage":null,"size":1982,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/pulls/1"},"html":{"href":"https://github.com/CodeCoreYVR/vancouvertechhub/pull/1"},"issue":{"href":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/issues/1"},"comments":{"href":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/CodeCoreYVR/vancouvertechhub/statuses/92b4cf6d75ef361b3e0bbb29e7c1879a72797ea9"}}}}