{"action":"created","comment":{"url":"https://api.github.com/repos/patrickshobe/black_thursday/pulls/comments/205984165","pull_request_review_id":141357358,"id":205984165,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTk4NDE2NQ==","diff_hunk":"@@ -0,0 +1,143 @@\n+# frozen_string_literal: true\n+\n+require 'minitest/autorun'\n+require 'minitest/pride'\n+require_relative '../lib/invoice_repository'\n+require_relative '../lib/invoice'\n+\n+class InvoiceRepositoryTest < Minitest::Test\n+  def setup\n+    @invoice1 = Invoice.new(id: 1,\n+                            customer_id: 1,\n+                            merchant_id: 12_335_938,\n+                            status: 'pending',\n+                            created_at: '2009-02-07',\n+                            updated_at: '2014-03-1')\n+    @invoice2 = Invoice.new(id: 2,\n+                            customer_id: 1,\n+                            merchant_id: 12_335_938,\n+                            status: 'shipped',\n+                            created_at: '2012-11-23',\n+                            updated_at: '2013-04-14')\n+    @invoice3 = Invoice.new(id: 3,\n+                            customer_id: 1,\n+                            merchant_id: 12_335_955,\n+                            status: 'shipped',\n+                            created_at: '2009-12-09',\n+                            updated_at: '2010-07-10')\n+    @invoice4 = Invoice.new(id: 4,\n+                            customer_id: 1,\n+                            merchant_id: 12_334_269,\n+                            status: 'pending',\n+                            created_at: '2013-08-05',\n+                            updated_at: '2014-06-06')\n+    @invoice_repository = InvoiceRepository.new\n+    @invoice_repository.all << @invoice1\n+    @invoice_repository.all << @invoice2\n+    @invoice_repository.all << @invoice3\n+    @invoice_repository.all << @invoice4\n+  end\n+\n+  def test_it_exists\n+    assert_instance_of InvoiceRepository, @invoice_repository\n+  end\n+\n+  def test_all_returns_all_invoices\n+    expected = [@invoice1, @invoice2, @invoice3, @invoice4]\n+    actual = @invoice_repository.all\n+\n+    assert_equal expected, actual\n+  end\n+\n+  def test_it_finds_all_by_status\n+    expected = [@invoice1, @invoice4]\n+    actual = @invoice_repository.find_all_by_status(:pending)\n+\n+    assert_equal expected, actual\n+  end\n+  def test_it_finds_all_by_merchant_id","path":"test/invoice_repository_test.rb","position":58,"original_position":58,"commit_id":"e1e076739f98c1f94704f575d521e24770c5ba9e","original_commit_id":"e1e076739f98c1f94704f575d521e24770c5ba9e","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Layout/EmptyLineBetweenDefs: Use empty lines between method definitions.","created_at":"2018-07-29T19:10:41Z","updated_at":"2018-07-29T19:10:42Z","html_url":"https://github.com/patrickshobe/black_thursday/pull/21#discussion_r205984165","pull_request_url":"https://api.github.com/repos/patrickshobe/black_thursday/pulls/21","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/patrickshobe/black_thursday/pulls/comments/205984165"},"html":{"href":"https://github.com/patrickshobe/black_thursday/pull/21#discussion_r205984165"},"pull_request":{"href":"https://api.github.com/repos/patrickshobe/black_thursday/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/patrickshobe/black_thursday/pulls/21","id":204656666,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NjU2NjY2","html_url":"https://github.com/patrickshobe/black_thursday/pull/21","diff_url":"https://github.com/patrickshobe/black_thursday/pull/21.diff","patch_url":"https://github.com/patrickshobe/black_thursday/pull/21.patch","issue_url":"https://api.github.com/repos/patrickshobe/black_thursday/issues/21","number":21,"state":"open","locked":false,"title":"By day","user":{"login":"patrickshobe","id":32880860,"node_id":"MDQ6VXNlcjMyODgwODYw","avatar_url":"https://avatars3.githubusercontent.com/u/32880860?v=4","gravatar_id":"","url":"https://api.github.com/users/patrickshobe","html_url":"https://github.com/patrickshobe","followers_url":"https://api.github.com/users/patrickshobe/followers","following_url":"https://api.github.com/users/patrickshobe/following{/other_user}","gists_url":"https://api.github.com/users/patrickshobe/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickshobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickshobe/subscriptions","organizations_url":"https://api.github.com/users/patrickshobe/orgs","repos_url":"https://api.github.com/users/patrickshobe/repos","events_url":"https://api.github.com/users/patrickshobe/events{/privacy}","received_events_url":"https://api.github.com/users/patrickshobe/received_events","type":"User","site_admin":false},"body":"@dmeskis Completes iteration 2","created_at":"2018-07-29T19:10:32Z","updated_at":"2018-07-29T19:10:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe3a57869b93ba3e7e523432df0f41bd8fbe7507","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/patrickshobe/black_thursday/pulls/21/commits","review_comments_url":"https://api.github.com/repos/patrickshobe/black_thursday/pulls/21/comments","review_comment_url":"https://api.github.com/repos/patrickshobe/black_thursday/pulls/comments{/number}","comments_url":"https://api.github.com/repos/patrickshobe/black_thursday/issues/21/comments","statuses_url":"https://api.github.com/repos/patrickshobe/black_thursday/statuses/e1e076739f98c1f94704f575d521e24770c5ba9e","head":{"label":"patrickshobe:by_day","ref":"by_day","sha":"e1e076739f98c1f94704f575d521e24770c5ba9e","user":{"login":"patrickshobe","id":32880860,"node_id":"MDQ6VXNlcjMyODgwODYw","avatar_url":"https://avatars3.githubusercontent.com/u/32880860?v=4","gravatar_id":"","url":"https://api.github.com/users/patrickshobe","html_url":"https://github.com/patrickshobe","followers_url":"https://api.github.com/users/patrickshobe/followers","following_url":"https://api.github.com/users/patrickshobe/following{/other_user}","gists_url":"https://api.github.com/users/patrickshobe/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickshobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickshobe/subscriptions","organizations_url":"https://api.github.com/users/patrickshobe/orgs","repos_url":"https://api.github.com/users/patrickshobe/repos","events_url":"https://api.github.com/users/patrickshobe/events{/privacy}","received_events_url":"https://api.github.com/users/patrickshobe/received_events","type":"User","site_admin":false},"repo":{"id":141745666,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE3NDU2NjY=","name":"black_thursday","full_name":"patrickshobe/black_thursday","owner":{"login":"patrickshobe","id":32880860,"node_id":"MDQ6VXNlcjMyODgwODYw","avatar_url":"https://avatars3.githubusercontent.com/u/32880860?v=4","gravatar_id":"","url":"https://api.github.com/users/patrickshobe","html_url":"https://github.com/patrickshobe","followers_url":"https://api.github.com/users/patrickshobe/followers","following_url":"https://api.github.com/users/patrickshobe/following{/other_user}","gists_url":"https://api.github.com/users/patrickshobe/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickshobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickshobe/subscriptions","organizations_url":"https://api.github.com/users/patrickshobe/orgs","repos_url":"https://api.github.com/users/patrickshobe/repos","events_url":"https://api.github.com/users/patrickshobe/events{/privacy}","received_events_url":"https://api.github.com/users/patrickshobe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/patrickshobe/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/patrickshobe/black_thursday","forks_url":"https://api.github.com/repos/patrickshobe/black_thursday/forks","keys_url":"https://api.github.com/repos/patrickshobe/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/patrickshobe/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/patrickshobe/black_thursday/teams","hooks_url":"https://api.github.com/repos/patrickshobe/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/patrickshobe/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/patrickshobe/black_thursday/events","assignees_url":"https://api.github.com/repos/patrickshobe/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/patrickshobe/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/patrickshobe/black_thursday/tags","blobs_url":"https://api.github.com/repos/patrickshobe/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/patrickshobe/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/patrickshobe/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/patrickshobe/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/patrickshobe/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/patrickshobe/black_thursday/languages","stargazers_url":"https://api.github.com/repos/patrickshobe/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/patrickshobe/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/patrickshobe/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/patrickshobe/black_thursday/subscription","commits_url":"https://api.github.com/repos/patrickshobe/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/patrickshobe/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/patrickshobe/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/patrickshobe/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/patrickshobe/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/patrickshobe/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/patrickshobe/black_thursday/merges","archive_url":"https://api.github.com/repos/patrickshobe/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/patrickshobe/black_thursday/downloads","issues_url":"https://api.github.com/repos/patrickshobe/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/patrickshobe/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/patrickshobe/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/patrickshobe/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/patrickshobe/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/patrickshobe/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/patrickshobe/black_thursday/deployments","created_at":"2018-07-20T18:34:35Z","updated_at":"2018-07-28T00:20:57Z","pushed_at":"2018-07-29T19:10:32Z","git_url":"git://github.com/patrickshobe/black_thursday.git","ssh_url":"git@github.com:patrickshobe/black_thursday.git","clone_url":"https://github.com/patrickshobe/black_thursday.git","svn_url":"https://github.com/patrickshobe/black_thursday","homepage":null,"size":1722,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"patrickshobe:master","ref":"master","sha":"69a4774185ead16bd3fc0070daef0b72ad21287d","user":{"login":"patrickshobe","id":32880860,"node_id":"MDQ6VXNlcjMyODgwODYw","avatar_url":"https://avatars3.githubusercontent.com/u/32880860?v=4","gravatar_id":"","url":"https://api.github.com/users/patrickshobe","html_url":"https://github.com/patrickshobe","followers_url":"https://api.github.com/users/patrickshobe/followers","following_url":"https://api.github.com/users/patrickshobe/following{/other_user}","gists_url":"https://api.github.com/users/patrickshobe/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickshobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickshobe/subscriptions","organizations_url":"https://api.github.com/users/patrickshobe/orgs","repos_url":"https://api.github.com/users/patrickshobe/repos","events_url":"https://api.github.com/users/patrickshobe/events{/privacy}","received_events_url":"https://api.github.com/users/patrickshobe/received_events","type":"User","site_admin":false},"repo":{"id":141745666,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE3NDU2NjY=","name":"black_thursday","full_name":"patrickshobe/black_thursday","owner":{"login":"patrickshobe","id":32880860,"node_id":"MDQ6VXNlcjMyODgwODYw","avatar_url":"https://avatars3.githubusercontent.com/u/32880860?v=4","gravatar_id":"","url":"https://api.github.com/users/patrickshobe","html_url":"https://github.com/patrickshobe","followers_url":"https://api.github.com/users/patrickshobe/followers","following_url":"https://api.github.com/users/patrickshobe/following{/other_user}","gists_url":"https://api.github.com/users/patrickshobe/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickshobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickshobe/subscriptions","organizations_url":"https://api.github.com/users/patrickshobe/orgs","repos_url":"https://api.github.com/users/patrickshobe/repos","events_url":"https://api.github.com/users/patrickshobe/events{/privacy}","received_events_url":"https://api.github.com/users/patrickshobe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/patrickshobe/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/patrickshobe/black_thursday","forks_url":"https://api.github.com/repos/patrickshobe/black_thursday/forks","keys_url":"https://api.github.com/repos/patrickshobe/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/patrickshobe/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/patrickshobe/black_thursday/teams","hooks_url":"https://api.github.com/repos/patrickshobe/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/patrickshobe/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/patrickshobe/black_thursday/events","assignees_url":"https://api.github.com/repos/patrickshobe/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/patrickshobe/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/patrickshobe/black_thursday/tags","blobs_url":"https://api.github.com/repos/patrickshobe/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/patrickshobe/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/patrickshobe/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/patrickshobe/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/patrickshobe/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/patrickshobe/black_thursday/languages","stargazers_url":"https://api.github.com/repos/patrickshobe/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/patrickshobe/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/patrickshobe/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/patrickshobe/black_thursday/subscription","commits_url":"https://api.github.com/repos/patrickshobe/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/patrickshobe/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/patrickshobe/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/patrickshobe/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/patrickshobe/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/patrickshobe/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/patrickshobe/black_thursday/merges","archive_url":"https://api.github.com/repos/patrickshobe/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/patrickshobe/black_thursday/downloads","issues_url":"https://api.github.com/repos/patrickshobe/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/patrickshobe/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/patrickshobe/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/patrickshobe/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/patrickshobe/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/patrickshobe/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/patrickshobe/black_thursday/deployments","created_at":"2018-07-20T18:34:35Z","updated_at":"2018-07-28T00:20:57Z","pushed_at":"2018-07-29T19:10:32Z","git_url":"git://github.com/patrickshobe/black_thursday.git","ssh_url":"git@github.com:patrickshobe/black_thursday.git","clone_url":"https://github.com/patrickshobe/black_thursday.git","svn_url":"https://github.com/patrickshobe/black_thursday","homepage":null,"size":1722,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/patrickshobe/black_thursday/pulls/21"},"html":{"href":"https://github.com/patrickshobe/black_thursday/pull/21"},"issue":{"href":"https://api.github.com/repos/patrickshobe/black_thursday/issues/21"},"comments":{"href":"https://api.github.com/repos/patrickshobe/black_thursday/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/patrickshobe/black_thursday/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/patrickshobe/black_thursday/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/patrickshobe/black_thursday/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/patrickshobe/black_thursday/statuses/e1e076739f98c1f94704f575d521e24770c5ba9e"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}