GitHub PullRequestReviewCommentEvent at 2014-07-25 08:01:38
Repository: osra
Actor: YaroSpace
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/AgileVentures/osra/pulls/comments/15389875","id":15389875,"diff_hunk":"@@ -19,33 +19,54 @@\n   end\n \n   it \"should have a valid name and province\" do\n-    Partner.new(:name => \"Partner One\", :province => @province).should be_valid\n+    Partner.new(:name => \"Partner One\", :province => @province1).should be_valid\n   end\n \n   it 'should default status \"Under Revision\" unless specified' do\n-    partner = Partner.create(:name => \"Partner One\", :province => @province)\n+    partner = Partner.create(:name => \"Partner One\", :province => @province1)\n     partner.status.should eq Status.find_by_name('Under Revision')\n   end\n \n   it 'should set the custom status when specified' do\n     status = Status.create(name: \"Active\", code: 1)\n-    partner = Partner.create(:name => \"Partner One\", :province => @province, :status => status)\n+    partner = Partner.create(:name => \"Partner One\", :province => @province1, :status => status)\n     partner.status.should eq status\n   end\n \n   it 'partnership start date should default to today date' do\n-    partner = Partner.create(:name => 'Partner One',:province => @province )\n+    partner = Partner.create(:name => 'Partner One',:province => @province1 )\n     partner.partnership_start_date.should eq Date.today\n   end\n \n   it 'partnership start date should be set to a custom date when specified' do\n-    partner = Partner.create(:name => 'Partner One',:province => @province, :partnership_start_date => Date.yesterday )\n+    partner = Partner.create(:name => 'Partner One',:province => @province1, :partnership_start_date => Date.yesterday )\n     partner.partnership_start_date.should eq Date.yesterday\n   end\n \n   it 'partnership start date should not be in the future' do\n-    partner = Partner.new(:name => 'Partner One',:province => @province, :partnership_start_date => Date.tomorrow )\n+    partner = Partner.new(:name => 'Partner One',:province => @province1, :partnership_start_date => Date.tomorrow )\n     partner.should_not be_valid\n   end\n \n+  it 'should have an osra_id' do\n+    partner = Partner.create(:name => 'Partner One',:province => @province1 )\n+    partner.osra_num.should_not be_nil\n+  end\n+\n+  it 'osra_num should have the first 2 digits as the province code' do\n+    partner = Partner.create(:name => 'Partner One',:province => @province1 )\n+    partner.osra_num[0...2].should eq partner.province.code.to_s\n+  end\n+\n+  it 'osra_num should have the last 3 digit as 001 for the first partner in a province' do\n+    partner = Partner.create(:name => 'Partner Two',:province => @province2 )\n+    partner.osra_num[2..-1].should eq '001'\n+  end\n+\n+  after(:all) do","path":"spec/models/partner_spec.rb","position":72,"original_position":72,"commit_id":"674341997a8bcc920ded3ed5ce3678e5775b6bc4","original_commit_id":"674341997a8bcc920ded3ed5ce3678e5775b6bc4","user":{"login":"YaroSpace","id":5670940,"avatar_url":"https://avatars.githubusercontent.com/u/5670940?","gravatar_id":"70b1babe87aa249dc295cb16c2579733","url":"https://api.github.com/users/YaroSpace","html_url":"https://github.com/YaroSpace","followers_url":"https://api.github.com/users/YaroSpace/followers","following_url":"https://api.github.com/users/YaroSpace/following{/other_user}","gists_url":"https://api.github.com/users/YaroSpace/gists{/gist_id}","starred_url":"https://api.github.com/users/YaroSpace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YaroSpace/subscriptions","organizations_url":"https://api.github.com/users/YaroSpace/orgs","repos_url":"https://api.github.com/users/YaroSpace/repos","events_url":"https://api.github.com/users/YaroSpace/events{/privacy}","received_events_url":"https://api.github.com/users/YaroSpace/received_events","type":"User","site_admin":false},"body":"I would prefer to use database_cleaner gem, it cleans test database automatically after each step.","created_at":"2014-07-25T08:01:38Z","updated_at":"2014-07-25T08:01:38Z","html_url":"https://github.com/AgileVentures/osra/pull/5#discussion_r15389875","pull_request_url":"https://api.github.com/repos/AgileVentures/osra/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/AgileVentures/osra/pulls/comments/15389875"},"html":{"href":"https://github.com/AgileVentures/osra/pull/5#discussion_r15389875"},"pull_request":{"href":"https://api.github.com/repos/AgileVentures/osra/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/AgileVentures/osra/pulls/5","id":18082804,"html_url":"https://github.com/AgileVentures/osra/pull/5","diff_url":"https://github.com/AgileVentures/osra/pull/5.diff","patch_url":"https://github.com/AgileVentures/osra/pull/5.patch","issue_url":"https://api.github.com/repos/AgileVentures/osra/issues/5","number":5,"state":"open","title":"Partner OSRA ID generation using sequences ","user":{"login":"motasem-salem","id":6000135,"avatar_url":"https://avatars.githubusercontent.com/u/6000135?","gravatar_id":"424010920ae192ff14f574860bf6de00","url":"https://api.github.com/users/motasem-salem","html_url":"https://github.com/motasem-salem","followers_url":"https://api.github.com/users/motasem-salem/followers","following_url":"https://api.github.com/users/motasem-salem/following{/other_user}","gists_url":"https://api.github.com/users/motasem-salem/gists{/gist_id}","starred_url":"https://api.github.com/users/motasem-salem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motasem-salem/subscriptions","organizations_url":"https://api.github.com/users/motasem-salem/orgs","repos_url":"https://api.github.com/users/motasem-salem/repos","events_url":"https://api.github.com/users/motasem-salem/events{/privacy}","received_events_url":"https://api.github.com/users/motasem-salem/received_events","type":"User","site_admin":false},"body":"Implemented generation of Partner OSRA ID through db sequences using the sequenced gem.","created_at":"2014-07-08T04:34:47Z","updated_at":"2014-07-25T08:01:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63100b4dc57204bb5928328bd81faf2596381a3b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AgileVentures/osra/pulls/5/commits","review_comments_url":"https://api.github.com/repos/AgileVentures/osra/pulls/5/comments","review_comment_url":"https://api.github.com/repos/AgileVentures/osra/pulls/comments/{number}","comments_url":"https://api.github.com/repos/AgileVentures/osra/issues/5/comments","statuses_url":"https://api.github.com/repos/AgileVentures/osra/statuses/674341997a8bcc920ded3ed5ce3678e5775b6bc4","head":{"label":"motasem-salem:partner_id_seq","ref":"partner_id_seq","sha":"674341997a8bcc920ded3ed5ce3678e5775b6bc4","user":{"login":"motasem-salem","id":6000135,"avatar_url":"https://avatars.githubusercontent.com/u/6000135?","gravatar_id":"424010920ae192ff14f574860bf6de00","url":"https://api.github.com/users/motasem-salem","html_url":"https://github.com/motasem-salem","followers_url":"https://api.github.com/users/motasem-salem/followers","following_url":"https://api.github.com/users/motasem-salem/following{/other_user}","gists_url":"https://api.github.com/users/motasem-salem/gists{/gist_id}","starred_url":"https://api.github.com/users/motasem-salem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motasem-salem/subscriptions","organizations_url":"https://api.github.com/users/motasem-salem/orgs","repos_url":"https://api.github.com/users/motasem-salem/repos","events_url":"https://api.github.com/users/motasem-salem/events{/privacy}","received_events_url":"https://api.github.com/users/motasem-salem/received_events","type":"User","site_admin":false},"repo":{"id":18947420,"name":"osra","full_name":"motasem-salem/osra","owner":{"login":"motasem-salem","id":6000135,"avatar_url":"https://avatars.githubusercontent.com/u/6000135?","gravatar_id":"424010920ae192ff14f574860bf6de00","url":"https://api.github.com/users/motasem-salem","html_url":"https://github.com/motasem-salem","followers_url":"https://api.github.com/users/motasem-salem/followers","following_url":"https://api.github.com/users/motasem-salem/following{/other_user}","gists_url":"https://api.github.com/users/motasem-salem/gists{/gist_id}","starred_url":"https://api.github.com/users/motasem-salem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motasem-salem/subscriptions","organizations_url":"https://api.github.com/users/motasem-salem/orgs","repos_url":"https://api.github.com/users/motasem-salem/repos","events_url":"https://api.github.com/users/motasem-salem/events{/privacy}","received_events_url":"https://api.github.com/users/motasem-salem/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/motasem-salem/osra","description":"Sponsor orphans in Syria & insure basic life & education requirements for Syrian children","fork":true,"url":"https://api.github.com/repos/motasem-salem/osra","forks_url":"https://api.github.com/repos/motasem-salem/osra/forks","keys_url":"https://api.github.com/repos/motasem-salem/osra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/motasem-salem/osra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/motasem-salem/osra/teams","hooks_url":"https://api.github.com/repos/motasem-salem/osra/hooks","issue_events_url":"https://api.github.com/repos/motasem-salem/osra/issues/events{/number}","events_url":"https://api.github.com/repos/motasem-salem/osra/events","assignees_url":"https://api.github.com/repos/motasem-salem/osra/assignees{/user}","branches_url":"https://api.github.com/repos/motasem-salem/osra/branches{/branch}","tags_url":"https://api.github.com/repos/motasem-salem/osra/tags","blobs_url":"https://api.github.com/repos/motasem-salem/osra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/motasem-salem/osra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/motasem-salem/osra/git/refs{/sha}","trees_url":"https://api.github.com/repos/motasem-salem/osra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/motasem-salem/osra/statuses/{sha}","languages_url":"https://api.github.com/repos/motasem-salem/osra/languages","stargazers_url":"https://api.github.com/repos/motasem-salem/osra/stargazers","contributors_url":"https://api.github.com/repos/motasem-salem/osra/contributors","subscribers_url":"https://api.github.com/repos/motasem-salem/osra/subscribers","subscription_url":"https://api.github.com/repos/motasem-salem/osra/subscription","commits_url":"https://api.github.com/repos/motasem-salem/osra/commits{/sha}","git_commits_url":"https://api.github.com/repos/motasem-salem/osra/git/commits{/sha}","comments_url":"https://api.github.com/repos/motasem-salem/osra/comments{/number}","issue_comment_url":"https://api.github.com/repos/motasem-salem/osra/issues/comments/{number}","contents_url":"https://api.github.com/repos/motasem-salem/osra/contents/{+path}","compare_url":"https://api.github.com/repos/motasem-salem/osra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/motasem-salem/osra/merges","archive_url":"https://api.github.com/repos/motasem-salem/osra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/motasem-salem/osra/downloads","issues_url":"https://api.github.com/repos/motasem-salem/osra/issues{/number}","pulls_url":"https://api.github.com/repos/motasem-salem/osra/pulls{/number}","milestones_url":"https://api.github.com/repos/motasem-salem/osra/milestones{/number}","notifications_url":"https://api.github.com/repos/motasem-salem/osra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/motasem-salem/osra/labels{/name}","releases_url":"https://api.github.com/repos/motasem-salem/osra/releases{/id}","created_at":"2014-04-19T18:05:24Z","updated_at":"2014-06-03T12:13:49Z","pushed_at":"2014-07-08T04:32:46Z","git_url":"git://github.com/motasem-salem/osra.git","ssh_url":"git@github.com:motasem-salem/osra.git","clone_url":"https://github.com/motasem-salem/osra.git","svn_url":"https://github.com/motasem-salem/osra","homepage":null,"size":473,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"develop"}},"base":{"label":"AgileVentures:develop","ref":"develop","sha":"a7ae7a388051c2ed58ea5839d1e666ae072b350e","user":{"login":"AgileVentures","id":5116968,"avatar_url":"https://avatars.githubusercontent.com/u/5116968?","gravatar_id":"cb33b32bd5d675db7be148542976e510","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?","gravatar_id":"cb33b32bd5d675db7be148542976e510","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-06-02T12:07:53Z","pushed_at":"2014-06-02T12:07:53Z","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":410,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":8,"mirror_url":null,"open_issues_count":1,"forks":8,"open_issues":1,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/AgileVentures/osra/pulls/5"},"html":{"href":"https://github.com/AgileVentures/osra/pull/5"},"issue":{"href":"https://api.github.com/repos/AgileVentures/osra/issues/5"},"comments":{"href":"https://api.github.com/repos/AgileVentures/osra/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/AgileVentures/osra/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/AgileVentures/osra/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/AgileVentures/osra/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/AgileVentures/osra/statuses/674341997a8bcc920ded3ed5ce3678e5775b6bc4"}}}}