GitHub PullRequestReviewCommentEvent at 2014-09-24 12:50:30
Repository: osra
Actor: PurityControl
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/AgileVentures/osra/pulls/comments/17968820","id":17968820,"diff_hunk":"@@ -18,10 +18,38 @@\n     it { is_expected.to_not allow_value(bad_date_value).for :start_date }\n   end\n \n+  it { is_expected.to belong_to :branch }\n+  it { is_expected.to belong_to :organization }\n   it { is_expected.to belong_to :status }\n   it { is_expected.to belong_to :sponsor_type }\n   it { is_expected.to have_many(:orphans).through :sponsorships }\n \n+  describe 'branch or organization affiliation' do\n+    describe 'must be affiliated to 1 branch or 1 organization' do\n+      let(:sponsor) {build_stubbed(:sponsor, :organization_id => nil, :branch_id => nil)}\n+      let(:organization) {build_stubbed(:organization)}\n+      let(:branch) {build_stubbed(:branch)}\n+      it 'cannot be unaffiliated' do\n+        expect(sponsor).to_not allow_value(nil).for :organization\n+        expect(sponsor).to_not allow_value(nil).for :branch","path":"spec/models/sponsor_spec.rb","position":17,"original_position":17,"commit_id":"e859e328623fb972abaf572a5ad4f1a52ba82b08","original_commit_id":"e859e328623fb972abaf572a5ad4f1a52ba82b08","user":{"login":"PurityControl","id":7509180,"avatar_url":"https://avatars.githubusercontent.com/u/7509180?v=2","gravatar_id":"","url":"https://api.github.com/users/PurityControl","html_url":"https://github.com/PurityControl","followers_url":"https://api.github.com/users/PurityControl/followers","following_url":"https://api.github.com/users/PurityControl/following{/other_user}","gists_url":"https://api.github.com/users/PurityControl/gists{/gist_id}","starred_url":"https://api.github.com/users/PurityControl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PurityControl/subscriptions","organizations_url":"https://api.github.com/users/PurityControl/orgs","repos_url":"https://api.github.com/users/PurityControl/repos","events_url":"https://api.github.com/users/PurityControl/events{/privacy}","received_events_url":"https://api.github.com/users/PurityControl/received_events","type":"User","site_admin":false},"body":"You have a good point for readability and I hadn't considered this. Now you have made me reflect on it though If we introduced something to the testing that made the sponsor invalid the single test would pass for the wrong reason. What are your thoughts on this?","created_at":"2014-09-24T12:50:30Z","updated_at":"2014-09-24T12:50:30Z","html_url":"https://github.com/AgileVentures/osra/pull/43#discussion_r17968820","pull_request_url":"https://api.github.com/repos/AgileVentures/osra/pulls/43","_links":{"self":{"href":"https://api.github.com/repos/AgileVentures/osra/pulls/comments/17968820"},"html":{"href":"https://github.com/AgileVentures/osra/pull/43#discussion_r17968820"},"pull_request":{"href":"https://api.github.com/repos/AgileVentures/osra/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/AgileVentures/osra/pulls/43","id":21585664,"html_url":"https://github.com/AgileVentures/osra/pull/43","diff_url":"https://github.com/AgileVentures/osra/pull/43.diff","patch_url":"https://github.com/AgileVentures/osra/pull/43.patch","issue_url":"https://api.github.com/repos/AgileVentures/osra/issues/43","number":43,"state":"open","locked":false,"title":"mvc framework required to implement sponsor_osra_id","user":{"login":"PurityControl","id":7509180,"avatar_url":"https://avatars.githubusercontent.com/u/7509180?v=2","gravatar_id":"","url":"https://api.github.com/users/PurityControl","html_url":"https://github.com/PurityControl","followers_url":"https://api.github.com/users/PurityControl/followers","following_url":"https://api.github.com/users/PurityControl/following{/other_user}","gists_url":"https://api.github.com/users/PurityControl/gists{/gist_id}","starred_url":"https://api.github.com/users/PurityControl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PurityControl/subscriptions","organizations_url":"https://api.github.com/users/PurityControl/orgs","repos_url":"https://api.github.com/users/PurityControl/repos","events_url":"https://api.github.com/users/PurityControl/events{/privacy}","received_events_url":"https://api.github.com/users/PurityControl/received_events","type":"User","site_admin":false},"body":"part of PT story https://www.pivotaltracker.com/story/show/75999516\r\n\r\n- model with validation that 1 and only one branch or oganisation is selected\r\n- migration to add organization reference to sponsor\r\n- belongs to organization reference in model\r\n- specs to check 1 branch or orgnaization has been selected\r\n- fixed sponsor factory so it is valid against new criteria\r\n- fixed feature files to  reference a branch so they can be valid\r\n- changed active admin form to show the organization and branch drop downs\r\n- added sequential_id field and osra_num field to sponsor table\r\n- implemented tests for osra_num functionality\r\n- implemented osra_num functionality\r\n","created_at":"2014-09-22T15:07:32Z","updated_at":"2014-09-24T12:50:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03ae476d0be7ee80e20d0fbca223009f02a2e944","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AgileVentures/osra/pulls/43/commits","review_comments_url":"https://api.github.com/repos/AgileVentures/osra/pulls/43/comments","review_comment_url":"https://api.github.com/repos/AgileVentures/osra/pulls/comments/{number}","comments_url":"https://api.github.com/repos/AgileVentures/osra/issues/43/comments","statuses_url":"https://api.github.com/repos/AgileVentures/osra/statuses/e859e328623fb972abaf572a5ad4f1a52ba82b08","head":{"label":"PurityControl:sponsor_osra_id","ref":"sponsor_osra_id","sha":"e859e328623fb972abaf572a5ad4f1a52ba82b08","user":{"login":"PurityControl","id":7509180,"avatar_url":"https://avatars.githubusercontent.com/u/7509180?v=2","gravatar_id":"","url":"https://api.github.com/users/PurityControl","html_url":"https://github.com/PurityControl","followers_url":"https://api.github.com/users/PurityControl/followers","following_url":"https://api.github.com/users/PurityControl/following{/other_user}","gists_url":"https://api.github.com/users/PurityControl/gists{/gist_id}","starred_url":"https://api.github.com/users/PurityControl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PurityControl/subscriptions","organizations_url":"https://api.github.com/users/PurityControl/orgs","repos_url":"https://api.github.com/users/PurityControl/repos","events_url":"https://api.github.com/users/PurityControl/events{/privacy}","received_events_url":"https://api.github.com/users/PurityControl/received_events","type":"User","site_admin":false},"repo":{"id":22786142,"name":"osra","full_name":"PurityControl/osra","owner":{"login":"PurityControl","id":7509180,"avatar_url":"https://avatars.githubusercontent.com/u/7509180?v=2","gravatar_id":"","url":"https://api.github.com/users/PurityControl","html_url":"https://github.com/PurityControl","followers_url":"https://api.github.com/users/PurityControl/followers","following_url":"https://api.github.com/users/PurityControl/following{/other_user}","gists_url":"https://api.github.com/users/PurityControl/gists{/gist_id}","starred_url":"https://api.github.com/users/PurityControl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PurityControl/subscriptions","organizations_url":"https://api.github.com/users/PurityControl/orgs","repos_url":"https://api.github.com/users/PurityControl/repos","events_url":"https://api.github.com/users/PurityControl/events{/privacy}","received_events_url":"https://api.github.com/users/PurityControl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PurityControl/osra","description":"Sponsor orphans in Syria & insure basic life & education requirements for Syrian children","fork":true,"url":"https://api.github.com/repos/PurityControl/osra","forks_url":"https://api.github.com/repos/PurityControl/osra/forks","keys_url":"https://api.github.com/repos/PurityControl/osra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PurityControl/osra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PurityControl/osra/teams","hooks_url":"https://api.github.com/repos/PurityControl/osra/hooks","issue_events_url":"https://api.github.com/repos/PurityControl/osra/issues/events{/number}","events_url":"https://api.github.com/repos/PurityControl/osra/events","assignees_url":"https://api.github.com/repos/PurityControl/osra/assignees{/user}","branches_url":"https://api.github.com/repos/PurityControl/osra/branches{/branch}","tags_url":"https://api.github.com/repos/PurityControl/osra/tags","blobs_url":"https://api.github.com/repos/PurityControl/osra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PurityControl/osra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PurityControl/osra/git/refs{/sha}","trees_url":"https://api.github.com/repos/PurityControl/osra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PurityControl/osra/statuses/{sha}","languages_url":"https://api.github.com/repos/PurityControl/osra/languages","stargazers_url":"https://api.github.com/repos/PurityControl/osra/stargazers","contributors_url":"https://api.github.com/repos/PurityControl/osra/contributors","subscribers_url":"https://api.github.com/repos/PurityControl/osra/subscribers","subscription_url":"https://api.github.com/repos/PurityControl/osra/subscription","commits_url":"https://api.github.com/repos/PurityControl/osra/commits{/sha}","git_commits_url":"https://api.github.com/repos/PurityControl/osra/git/commits{/sha}","comments_url":"https://api.github.com/repos/PurityControl/osra/comments{/number}","issue_comment_url":"https://api.github.com/repos/PurityControl/osra/issues/comments/{number}","contents_url":"https://api.github.com/repos/PurityControl/osra/contents/{+path}","compare_url":"https://api.github.com/repos/PurityControl/osra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PurityControl/osra/merges","archive_url":"https://api.github.com/repos/PurityControl/osra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PurityControl/osra/downloads","issues_url":"https://api.github.com/repos/PurityControl/osra/issues{/number}","pulls_url":"https://api.github.com/repos/PurityControl/osra/pulls{/number}","milestones_url":"https://api.github.com/repos/PurityControl/osra/milestones{/number}","notifications_url":"https://api.github.com/repos/PurityControl/osra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PurityControl/osra/labels{/name}","releases_url":"https://api.github.com/repos/PurityControl/osra/releases{/id}","created_at":"2014-08-09T12:54:57Z","updated_at":"2014-09-04T08:10:22Z","pushed_at":"2014-09-23T07:12:03Z","git_url":"git://github.com/PurityControl/osra.git","ssh_url":"git@github.com:PurityControl/osra.git","clone_url":"https://github.com/PurityControl/osra.git","svn_url":"https://github.com/PurityControl/osra","homepage":null,"size":719,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"develop"}},"base":{"label":"AgileVentures:develop","ref":"develop","sha":"df5632b0d23aad9a0ce2a3619aa0d31be377cad0","user":{"login":"AgileVentures","id":5116968,"avatar_url":"https://avatars.githubusercontent.com/u/5116968?v=2","gravatar_id":"","url":"https://api.github.com/users/AgileVentures","html_url":"https://github.com/AgileVentures","followers_url":"https://api.github.com/users/AgileVentures/followers","following_url":"https://api.github.com/users/AgileVentures/following{/other_user}","gists_url":"https://api.github.com/users/AgileVentures/gists{/gist_id}","starred_url":"https://api.github.com/users/AgileVentures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgileVentures/subscriptions","organizations_url":"https://api.github.com/users/AgileVentures/orgs","repos_url":"https://api.github.com/users/AgileVentures/repos","events_url":"https://api.github.com/users/AgileVentures/events{/privacy}","received_events_url":"https://api.github.com/users/AgileVentures/received_events","type":"Organization","site_admin":false},"repo":{"id":18855271,"name":"osra","full_name":"AgileVentures/osra","owner":{"login":"AgileVentures","id":5116968,"avatar_url":"https://avatars.githubusercontent.com/u/5116968?v=2","gravatar_id":"","url":"https://api.github.com/users/AgileVentures","html_url":"https://github.com/AgileVentures","followers_url":"https://api.github.com/users/AgileVentures/followers","following_url":"https://api.github.com/users/AgileVentures/following{/other_user}","gists_url":"https://api.github.com/users/AgileVentures/gists{/gist_id}","starred_url":"https://api.github.com/users/AgileVentures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgileVentures/subscriptions","organizations_url":"https://api.github.com/users/AgileVentures/orgs","repos_url":"https://api.github.com/users/AgileVentures/repos","events_url":"https://api.github.com/users/AgileVentures/events{/privacy}","received_events_url":"https://api.github.com/users/AgileVentures/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AgileVentures/osra","description":"Sponsor orphans in Syria & insure basic life & education requirements for Syrian children","fork":false,"url":"https://api.github.com/repos/AgileVentures/osra","forks_url":"https://api.github.com/repos/AgileVentures/osra/forks","keys_url":"https://api.github.com/repos/AgileVentures/osra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AgileVentures/osra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AgileVentures/osra/teams","hooks_url":"https://api.github.com/repos/AgileVentures/osra/hooks","issue_events_url":"https://api.github.com/repos/AgileVentures/osra/issues/events{/number}","events_url":"https://api.github.com/repos/AgileVentures/osra/events","assignees_url":"https://api.github.com/repos/AgileVentures/osra/assignees{/user}","branches_url":"https://api.github.com/repos/AgileVentures/osra/branches{/branch}","tags_url":"https://api.github.com/repos/AgileVentures/osra/tags","blobs_url":"https://api.github.com/repos/AgileVentures/osra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AgileVentures/osra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AgileVentures/osra/git/refs{/sha}","trees_url":"https://api.github.com/repos/AgileVentures/osra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AgileVentures/osra/statuses/{sha}","languages_url":"https://api.github.com/repos/AgileVentures/osra/languages","stargazers_url":"https://api.github.com/repos/AgileVentures/osra/stargazers","contributors_url":"https://api.github.com/repos/AgileVentures/osra/contributors","subscribers_url":"https://api.github.com/repos/AgileVentures/osra/subscribers","subscription_url":"https://api.github.com/repos/AgileVentures/osra/subscription","commits_url":"https://api.github.com/repos/AgileVentures/osra/commits{/sha}","git_commits_url":"https://api.github.com/repos/AgileVentures/osra/git/commits{/sha}","comments_url":"https://api.github.com/repos/AgileVentures/osra/comments{/number}","issue_comment_url":"https://api.github.com/repos/AgileVentures/osra/issues/comments/{number}","contents_url":"https://api.github.com/repos/AgileVentures/osra/contents/{+path}","compare_url":"https://api.github.com/repos/AgileVentures/osra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AgileVentures/osra/merges","archive_url":"https://api.github.com/repos/AgileVentures/osra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AgileVentures/osra/downloads","issues_url":"https://api.github.com/repos/AgileVentures/osra/issues{/number}","pulls_url":"https://api.github.com/repos/AgileVentures/osra/pulls{/number}","milestones_url":"https://api.github.com/repos/AgileVentures/osra/milestones{/number}","notifications_url":"https://api.github.com/repos/AgileVentures/osra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AgileVentures/osra/labels{/name}","releases_url":"https://api.github.com/repos/AgileVentures/osra/releases{/id}","created_at":"2014-04-16T20:43:09Z","updated_at":"2014-09-07T03:29:18Z","pushed_at":"2014-09-22T21:40:15Z","git_url":"git://github.com/AgileVentures/osra.git","ssh_url":"git@github.com:AgileVentures/osra.git","clone_url":"https://github.com/AgileVentures/osra.git","svn_url":"https://github.com/AgileVentures/osra","homepage":null,"size":1231,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":4,"forks":13,"open_issues":4,"watchers":5,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/AgileVentures/osra/pulls/43"},"html":{"href":"https://github.com/AgileVentures/osra/pull/43"},"issue":{"href":"https://api.github.com/repos/AgileVentures/osra/issues/43"},"comments":{"href":"https://api.github.com/repos/AgileVentures/osra/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/AgileVentures/osra/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/AgileVentures/osra/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/AgileVentures/osra/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/AgileVentures/osra/statuses/e859e328623fb972abaf572a5ad4f1a52ba82b08"}}}}