{"action":"created","comment":{"url":"https://api.github.com/repos/bitzesty/qae/pulls/comments/27969317","id":27969317,"diff_hunk":"@@ -0,0 +1,77 @@\n+require 'rails_helper'\n+\n+describe \"FeedbackPdfs::Base\" do\n+  let!(:form_answer_2014_innovation) do\n+    FactoryGirl.create :form_answer, :submitted, :innovation,\n+                        award_year: 2014\n+  end\n+\n+  let!(:form_answer_2015_innovation) do\n+    FactoryGirl.create :form_answer, :submitted, :innovation,\n+                        award_year: 2015\n+  end\n+\n+  let!(:form_answer_2014_trade) do\n+    FactoryGirl.create :form_answer, :submitted, :trade,\n+                        award_year: 2014\n+  end\n+\n+  let!(:form_answer_2015_trade) do\n+    FactoryGirl.create :form_answer, :submitted, :trade,\n+                        award_year: 2015\n+  end\n+\n+  before do\n+    create :feedback, submitted: true,\n+                      form_answer: form_answer_2014_trade,\n+                      document: set_feedback_content(:trade)\n+\n+    create :feedback, submitted: true,\n+                      form_answer: form_answer_2015_trade,\n+                      document: set_feedback_content(:trade)\n+\n+    create :feedback, submitted: true,\n+                      form_answer: form_answer_2015_innovation,\n+                      document: set_feedback_content(:innovation)\n+\n+    create :feedback, submitted: true,\n+                      form_answer: form_answer_2014_innovation,\n+                      document: set_feedback_content(:innovation)\n+  end\n+\n+  describe \"#set_feedbacks\" do\n+    it \"should be ordered in year and filtered by category\" do\n+      innovation_feedbacks = FeedbackPdfs::Base.new(\"all\", {category: \"innovation\"})\n+                                               .set_feedbacks\n+                                               .map(&:id)\n+\n+      expect(innovation_feedbacks).to match_array([\n+        form_answer_2014_innovation.feedback.id,\n+        form_answer_2015_innovation.feedback.id\n+      ])\n+\n+      trade_feedbacks = FeedbackPdfs::Base.new(\"all\", {category: \"trade\"})","path":"spec/unit/pdf_generators/feedback_pdfs/base_spec.rb","position":53,"original_position":53,"commit_id":"4d46fb229cead94a57b6e1b328c7cbcb6834e92a","original_commit_id":"4d46fb229cead94a57b6e1b328c7cbcb6834e92a","user":{"login":"matthewford","id":215,"avatar_url":"https://avatars.githubusercontent.com/u/215?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewford","html_url":"https://github.com/matthewford","followers_url":"https://api.github.com/users/matthewford/followers","following_url":"https://api.github.com/users/matthewford/following{/other_user}","gists_url":"https://api.github.com/users/matthewford/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewford/subscriptions","organizations_url":"https://api.github.com/users/matthewford/orgs","repos_url":"https://api.github.com/users/matthewford/repos","events_url":"https://api.github.com/users/matthewford/events{/privacy}","received_events_url":"https://api.github.com/users/matthewford/received_events","type":"User","site_admin":false},"body":"Redundant curly braces around a hash parameter.<br>Space inside { missing.<br>Space inside } missing.","created_at":"2015-04-08T13:33:28Z","updated_at":"2015-04-08T13:33:28Z","html_url":"https://github.com/bitzesty/qae/pull/281#discussion_r27969317","pull_request_url":"https://api.github.com/repos/bitzesty/qae/pulls/281","_links":{"self":{"href":"https://api.github.com/repos/bitzesty/qae/pulls/comments/27969317"},"html":{"href":"https://github.com/bitzesty/qae/pull/281#discussion_r27969317"},"pull_request":{"href":"https://api.github.com/repos/bitzesty/qae/pulls/281"}}},"pull_request":{"url":"https://api.github.com/repos/bitzesty/qae/pulls/281","id":32859970,"html_url":"https://github.com/bitzesty/qae/pull/281","diff_url":"https://github.com/bitzesty/qae/pull/281.diff","patch_url":"https://github.com/bitzesty/qae/pull/281.patch","issue_url":"https://api.github.com/repos/bitzesty/qae/issues/281","number":281,"state":"open","locked":false,"title":"QAE1137 feedbacks pdf add category year separation","user":{"login":"RuslanHamidullin","id":358508,"avatar_url":"https://avatars.githubusercontent.com/u/358508?v=3","gravatar_id":"","url":"https://api.github.com/users/RuslanHamidullin","html_url":"https://github.com/RuslanHamidullin","followers_url":"https://api.github.com/users/RuslanHamidullin/followers","following_url":"https://api.github.com/users/RuslanHamidullin/following{/other_user}","gists_url":"https://api.github.com/users/RuslanHamidullin/gists{/gist_id}","starred_url":"https://api.github.com/users/RuslanHamidullin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RuslanHamidullin/subscriptions","organizations_url":"https://api.github.com/users/RuslanHamidullin/orgs","repos_url":"https://api.github.com/users/RuslanHamidullin/repos","events_url":"https://api.github.com/users/RuslanHamidullin/events{/privacy}","received_events_url":"https://api.github.com/users/RuslanHamidullin/received_events","type":"User","site_admin":false},"body":"Mostly related to [QAE1137](https://podio.com/bitzesty/app-qae/apps/stories/items/137)\r\n```\r\nAs an Admin I want to download all Feedbacks as one pdf (all feedbacks) from Dashboard\r\n```\r\n\r\n * Admin Feedback PDF:\r\n    - added separation per Award category and ordering by year\r\n    - added displaying of Sub-Category (Outstanding / Continious)\r\n    - added some Rspec tests for it\r\n*  Internation Trade Form: C1 placeholder_preselected_condition: Fixed typo error","created_at":"2015-04-08T13:33:09Z","updated_at":"2015-04-08T13:33:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7345cb6812cb7c6ad9455fdb44460b1d256ab2da","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bitzesty/qae/pulls/281/commits","review_comments_url":"https://api.github.com/repos/bitzesty/qae/pulls/281/comments","review_comment_url":"https://api.github.com/repos/bitzesty/qae/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitzesty/qae/issues/281/comments","statuses_url":"https://api.github.com/repos/bitzesty/qae/statuses/4d46fb229cead94a57b6e1b328c7cbcb6834e92a","head":{"label":"bitzesty:QAE1137-feedbacks-pdf-add-category-year-separation","ref":"QAE1137-feedbacks-pdf-add-category-year-separation","sha":"4d46fb229cead94a57b6e1b328c7cbcb6834e92a","user":{"login":"bitzesty","id":70534,"avatar_url":"https://avatars.githubusercontent.com/u/70534?v=3","gravatar_id":"","url":"https://api.github.com/users/bitzesty","html_url":"https://github.com/bitzesty","followers_url":"https://api.github.com/users/bitzesty/followers","following_url":"https://api.github.com/users/bitzesty/following{/other_user}","gists_url":"https://api.github.com/users/bitzesty/gists{/gist_id}","starred_url":"https://api.github.com/users/bitzesty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitzesty/subscriptions","organizations_url":"https://api.github.com/users/bitzesty/orgs","repos_url":"https://api.github.com/users/bitzesty/repos","events_url":"https://api.github.com/users/bitzesty/events{/privacy}","received_events_url":"https://api.github.com/users/bitzesty/received_events","type":"Organization","site_admin":false},"repo":{"id":26758825,"name":"qae","full_name":"bitzesty/qae","owner":{"login":"bitzesty","id":70534,"avatar_url":"https://avatars.githubusercontent.com/u/70534?v=3","gravatar_id":"","url":"https://api.github.com/users/bitzesty","html_url":"https://github.com/bitzesty","followers_url":"https://api.github.com/users/bitzesty/followers","following_url":"https://api.github.com/users/bitzesty/following{/other_user}","gists_url":"https://api.github.com/users/bitzesty/gists{/gist_id}","starred_url":"https://api.github.com/users/bitzesty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitzesty/subscriptions","organizations_url":"https://api.github.com/users/bitzesty/orgs","repos_url":"https://api.github.com/users/bitzesty/repos","events_url":"https://api.github.com/users/bitzesty/events{/privacy}","received_events_url":"https://api.github.com/users/bitzesty/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitzesty/qae","description":"[Beta] Queens Award for Enterprise","fork":false,"url":"https://api.github.com/repos/bitzesty/qae","forks_url":"https://api.github.com/repos/bitzesty/qae/forks","keys_url":"https://api.github.com/repos/bitzesty/qae/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitzesty/qae/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitzesty/qae/teams","hooks_url":"https://api.github.com/repos/bitzesty/qae/hooks","issue_events_url":"https://api.github.com/repos/bitzesty/qae/issues/events{/number}","events_url":"https://api.github.com/repos/bitzesty/qae/events","assignees_url":"https://api.github.com/repos/bitzesty/qae/assignees{/user}","branches_url":"https://api.github.com/repos/bitzesty/qae/branches{/branch}","tags_url":"https://api.github.com/repos/bitzesty/qae/tags","blobs_url":"https://api.github.com/repos/bitzesty/qae/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitzesty/qae/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitzesty/qae/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitzesty/qae/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitzesty/qae/statuses/{sha}","languages_url":"https://api.github.com/repos/bitzesty/qae/languages","stargazers_url":"https://api.github.com/repos/bitzesty/qae/stargazers","contributors_url":"https://api.github.com/repos/bitzesty/qae/contributors","subscribers_url":"https://api.github.com/repos/bitzesty/qae/subscribers","subscription_url":"https://api.github.com/repos/bitzesty/qae/subscription","commits_url":"https://api.github.com/repos/bitzesty/qae/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitzesty/qae/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitzesty/qae/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitzesty/qae/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitzesty/qae/contents/{+path}","compare_url":"https://api.github.com/repos/bitzesty/qae/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitzesty/qae/merges","archive_url":"https://api.github.com/repos/bitzesty/qae/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitzesty/qae/downloads","issues_url":"https://api.github.com/repos/bitzesty/qae/issues{/number}","pulls_url":"https://api.github.com/repos/bitzesty/qae/pulls{/number}","milestones_url":"https://api.github.com/repos/bitzesty/qae/milestones{/number}","notifications_url":"https://api.github.com/repos/bitzesty/qae/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitzesty/qae/labels{/name}","releases_url":"https://api.github.com/repos/bitzesty/qae/releases{/id}","created_at":"2014-11-17T13:56:00Z","updated_at":"2015-04-08T11:35:33Z","pushed_at":"2015-04-08T13:33:09Z","git_url":"git://github.com/bitzesty/qae.git","ssh_url":"git@github.com:bitzesty/qae.git","clone_url":"https://github.com/bitzesty/qae.git","svn_url":"https://github.com/bitzesty/qae","homepage":"","size":19145,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":12,"forks":2,"open_issues":12,"watchers":2,"default_branch":"master"}},"base":{"label":"bitzesty:master","ref":"master","sha":"60965eaac788787263c6e7ca6926f530027f59f5","user":{"login":"bitzesty","id":70534,"avatar_url":"https://avatars.githubusercontent.com/u/70534?v=3","gravatar_id":"","url":"https://api.github.com/users/bitzesty","html_url":"https://github.com/bitzesty","followers_url":"https://api.github.com/users/bitzesty/followers","following_url":"https://api.github.com/users/bitzesty/following{/other_user}","gists_url":"https://api.github.com/users/bitzesty/gists{/gist_id}","starred_url":"https://api.github.com/users/bitzesty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitzesty/subscriptions","organizations_url":"https://api.github.com/users/bitzesty/orgs","repos_url":"https://api.github.com/users/bitzesty/repos","events_url":"https://api.github.com/users/bitzesty/events{/privacy}","received_events_url":"https://api.github.com/users/bitzesty/received_events","type":"Organization","site_admin":false},"repo":{"id":26758825,"name":"qae","full_name":"bitzesty/qae","owner":{"login":"bitzesty","id":70534,"avatar_url":"https://avatars.githubusercontent.com/u/70534?v=3","gravatar_id":"","url":"https://api.github.com/users/bitzesty","html_url":"https://github.com/bitzesty","followers_url":"https://api.github.com/users/bitzesty/followers","following_url":"https://api.github.com/users/bitzesty/following{/other_user}","gists_url":"https://api.github.com/users/bitzesty/gists{/gist_id}","starred_url":"https://api.github.com/users/bitzesty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitzesty/subscriptions","organizations_url":"https://api.github.com/users/bitzesty/orgs","repos_url":"https://api.github.com/users/bitzesty/repos","events_url":"https://api.github.com/users/bitzesty/events{/privacy}","received_events_url":"https://api.github.com/users/bitzesty/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitzesty/qae","description":"[Beta] Queens Award for Enterprise","fork":false,"url":"https://api.github.com/repos/bitzesty/qae","forks_url":"https://api.github.com/repos/bitzesty/qae/forks","keys_url":"https://api.github.com/repos/bitzesty/qae/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitzesty/qae/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitzesty/qae/teams","hooks_url":"https://api.github.com/repos/bitzesty/qae/hooks","issue_events_url":"https://api.github.com/repos/bitzesty/qae/issues/events{/number}","events_url":"https://api.github.com/repos/bitzesty/qae/events","assignees_url":"https://api.github.com/repos/bitzesty/qae/assignees{/user}","branches_url":"https://api.github.com/repos/bitzesty/qae/branches{/branch}","tags_url":"https://api.github.com/repos/bitzesty/qae/tags","blobs_url":"https://api.github.com/repos/bitzesty/qae/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitzesty/qae/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitzesty/qae/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitzesty/qae/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitzesty/qae/statuses/{sha}","languages_url":"https://api.github.com/repos/bitzesty/qae/languages","stargazers_url":"https://api.github.com/repos/bitzesty/qae/stargazers","contributors_url":"https://api.github.com/repos/bitzesty/qae/contributors","subscribers_url":"https://api.github.com/repos/bitzesty/qae/subscribers","subscription_url":"https://api.github.com/repos/bitzesty/qae/subscription","commits_url":"https://api.github.com/repos/bitzesty/qae/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitzesty/qae/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitzesty/qae/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitzesty/qae/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitzesty/qae/contents/{+path}","compare_url":"https://api.github.com/repos/bitzesty/qae/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitzesty/qae/merges","archive_url":"https://api.github.com/repos/bitzesty/qae/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitzesty/qae/downloads","issues_url":"https://api.github.com/repos/bitzesty/qae/issues{/number}","pulls_url":"https://api.github.com/repos/bitzesty/qae/pulls{/number}","milestones_url":"https://api.github.com/repos/bitzesty/qae/milestones{/number}","notifications_url":"https://api.github.com/repos/bitzesty/qae/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitzesty/qae/labels{/name}","releases_url":"https://api.github.com/repos/bitzesty/qae/releases{/id}","created_at":"2014-11-17T13:56:00Z","updated_at":"2015-04-08T11:35:33Z","pushed_at":"2015-04-08T13:33:09Z","git_url":"git://github.com/bitzesty/qae.git","ssh_url":"git@github.com:bitzesty/qae.git","clone_url":"https://github.com/bitzesty/qae.git","svn_url":"https://github.com/bitzesty/qae","homepage":"","size":19145,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":12,"forks":2,"open_issues":12,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitzesty/qae/pulls/281"},"html":{"href":"https://github.com/bitzesty/qae/pull/281"},"issue":{"href":"https://api.github.com/repos/bitzesty/qae/issues/281"},"comments":{"href":"https://api.github.com/repos/bitzesty/qae/issues/281/comments"},"review_comments":{"href":"https://api.github.com/repos/bitzesty/qae/pulls/281/comments"},"review_comment":{"href":"https://api.github.com/repos/bitzesty/qae/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitzesty/qae/pulls/281/commits"},"statuses":{"href":"https://api.github.com/repos/bitzesty/qae/statuses/4d46fb229cead94a57b6e1b328c7cbcb6834e92a"}}}}