{"action":"created","comment":{"url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/pulls/comments/191648018","pull_request_review_id":124256210,"id":191648018,"diff_hunk":"@@ -2,16 +2,101 @@\n require './lib/sales_engine'\n require './lib/transaction_repository'\n require 'bigdecimal'\n-require 'pry'\n \n class TransactionRepositoryTest < Minitest::Test\n   def setup\n     transaction_info = {:transactions => \"./data/transactions.csv\"}\n     se = SalesEngine.from_csv(transaction_info)\n     @t = se.transactions\n+    @attributes = {\n+        :invoice_id => 8,\n+        :credit_card_number => \"4242424242424242\",\n+        :credit_card_expiration_date => \"0220\",\n+        :result => \"success\",\n+        :created_at => Time.now,\n+        :updated_at => Time.now\n+      }\n   end\n \n   def test_it_exists\n     assert_instance_of(TransactionRepository, @t)\n   end\n+\n+  def test_all\n+    assert_equal 4985, @t.all.length\n+  end\n+\n+  def test_find_by_id\n+    expected = @t.find_by_id(8)\n+    assert_equal \"4839506591130477\", expected.credit_card_number\n+    assert_equal Transaction, expected.class\n+  end\n+\n+  def test_find_all_by_invoice_id\n+    expected = @t.find_all_by_invoice_id(2179)\n+    assert_equal 2, expected.length\n+    assert_equal Transaction, expected.first.class\n+  end\n+\n+  def test_find_all_by_credit_card_number\n+    expected = @t.find_all_by_credit_card_number(\"4848466917766329\")\n+    binding.pry\n+    assert_equal 1, expected.length\n+    assert_equal Transaction, expected.first.class\n+    credit_card_number = \"4848466917766328\"\n+    expected = @t.find_all_by_credit_card_number(\"4848466917766328\")","path":"test/transaction_repository_test.rb","position":47,"original_position":47,"commit_id":"58af682a0c3d16b409c177a8d0f6d34f2bf1c364","original_commit_id":"58af682a0c3d16b409c177a8d0f6d34f2bf1c364","user":{"login":"houndci-bot","id":6697940,"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":"Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.","created_at":"2018-05-30T05:47:13Z","updated_at":"2018-05-30T05:47:14Z","html_url":"https://github.com/KeeganCorrigan/black_thursday/pull/6#discussion_r191648018","pull_request_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/pulls/6","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/KeeganCorrigan/black_thursday/pulls/comments/191648018"},"html":{"href":"https://github.com/KeeganCorrigan/black_thursday/pull/6#discussion_r191648018"},"pull_request":{"href":"https://api.github.com/repos/KeeganCorrigan/black_thursday/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/pulls/6","id":191340003,"html_url":"https://github.com/KeeganCorrigan/black_thursday/pull/6","diff_url":"https://github.com/KeeganCorrigan/black_thursday/pull/6.diff","patch_url":"https://github.com/KeeganCorrigan/black_thursday/pull/6.patch","issue_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/issues/6","number":6,"state":"closed","locked":false,"title":"Iteration 3","user":{"login":"KeeganCorrigan","id":8312280,"avatar_url":"https://avatars3.githubusercontent.com/u/8312280?v=4","gravatar_id":"","url":"https://api.github.com/users/KeeganCorrigan","html_url":"https://github.com/KeeganCorrigan","followers_url":"https://api.github.com/users/KeeganCorrigan/followers","following_url":"https://api.github.com/users/KeeganCorrigan/following{/other_user}","gists_url":"https://api.github.com/users/KeeganCorrigan/gists{/gist_id}","starred_url":"https://api.github.com/users/KeeganCorrigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KeeganCorrigan/subscriptions","organizations_url":"https://api.github.com/users/KeeganCorrigan/orgs","repos_url":"https://api.github.com/users/KeeganCorrigan/repos","events_url":"https://api.github.com/users/KeeganCorrigan/events{/privacy}","received_events_url":"https://api.github.com/users/KeeganCorrigan/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-30T05:46:53Z","updated_at":"2018-05-30T05:47:14Z","closed_at":"2018-05-30T05:47:03Z","merged_at":"2018-05-30T05:47:03Z","merge_commit_sha":"a55dcb6ed319481d93af7a5da5aa88493cab3d6a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/pulls/6/commits","review_comments_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/pulls/6/comments","review_comment_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/issues/6/comments","statuses_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/statuses/58af682a0c3d16b409c177a8d0f6d34f2bf1c364","head":{"label":"KeeganCorrigan:iteration_3","ref":"iteration_3","sha":"58af682a0c3d16b409c177a8d0f6d34f2bf1c364","user":{"login":"KeeganCorrigan","id":8312280,"avatar_url":"https://avatars3.githubusercontent.com/u/8312280?v=4","gravatar_id":"","url":"https://api.github.com/users/KeeganCorrigan","html_url":"https://github.com/KeeganCorrigan","followers_url":"https://api.github.com/users/KeeganCorrigan/followers","following_url":"https://api.github.com/users/KeeganCorrigan/following{/other_user}","gists_url":"https://api.github.com/users/KeeganCorrigan/gists{/gist_id}","starred_url":"https://api.github.com/users/KeeganCorrigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KeeganCorrigan/subscriptions","organizations_url":"https://api.github.com/users/KeeganCorrigan/orgs","repos_url":"https://api.github.com/users/KeeganCorrigan/repos","events_url":"https://api.github.com/users/KeeganCorrigan/events{/privacy}","received_events_url":"https://api.github.com/users/KeeganCorrigan/received_events","type":"User","site_admin":false},"repo":{"id":134893922,"name":"black_thursday","full_name":"KeeganCorrigan/black_thursday","owner":{"login":"KeeganCorrigan","id":8312280,"avatar_url":"https://avatars3.githubusercontent.com/u/8312280?v=4","gravatar_id":"","url":"https://api.github.com/users/KeeganCorrigan","html_url":"https://github.com/KeeganCorrigan","followers_url":"https://api.github.com/users/KeeganCorrigan/followers","following_url":"https://api.github.com/users/KeeganCorrigan/following{/other_user}","gists_url":"https://api.github.com/users/KeeganCorrigan/gists{/gist_id}","starred_url":"https://api.github.com/users/KeeganCorrigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KeeganCorrigan/subscriptions","organizations_url":"https://api.github.com/users/KeeganCorrigan/orgs","repos_url":"https://api.github.com/users/KeeganCorrigan/repos","events_url":"https://api.github.com/users/KeeganCorrigan/events{/privacy}","received_events_url":"https://api.github.com/users/KeeganCorrigan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KeeganCorrigan/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/KeeganCorrigan/black_thursday","forks_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/forks","keys_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/teams","hooks_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/events","assignees_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/tags","blobs_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/languages","stargazers_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/subscription","commits_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/merges","archive_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/downloads","issues_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/deployments","created_at":"2018-05-25T18:57:42Z","updated_at":"2018-05-30T05:47:04Z","pushed_at":"2018-05-30T05:47:06Z","git_url":"git://github.com/KeeganCorrigan/black_thursday.git","ssh_url":"git@github.com:KeeganCorrigan/black_thursday.git","clone_url":"https://github.com/KeeganCorrigan/black_thursday.git","svn_url":"https://github.com/KeeganCorrigan/black_thursday","homepage":null,"size":1718,"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":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"KeeganCorrigan:master","ref":"master","sha":"ee96755282ed8f5df7c600bd3dd2472f325cc5c7","user":{"login":"KeeganCorrigan","id":8312280,"avatar_url":"https://avatars3.githubusercontent.com/u/8312280?v=4","gravatar_id":"","url":"https://api.github.com/users/KeeganCorrigan","html_url":"https://github.com/KeeganCorrigan","followers_url":"https://api.github.com/users/KeeganCorrigan/followers","following_url":"https://api.github.com/users/KeeganCorrigan/following{/other_user}","gists_url":"https://api.github.com/users/KeeganCorrigan/gists{/gist_id}","starred_url":"https://api.github.com/users/KeeganCorrigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KeeganCorrigan/subscriptions","organizations_url":"https://api.github.com/users/KeeganCorrigan/orgs","repos_url":"https://api.github.com/users/KeeganCorrigan/repos","events_url":"https://api.github.com/users/KeeganCorrigan/events{/privacy}","received_events_url":"https://api.github.com/users/KeeganCorrigan/received_events","type":"User","site_admin":false},"repo":{"id":134893922,"name":"black_thursday","full_name":"KeeganCorrigan/black_thursday","owner":{"login":"KeeganCorrigan","id":8312280,"avatar_url":"https://avatars3.githubusercontent.com/u/8312280?v=4","gravatar_id":"","url":"https://api.github.com/users/KeeganCorrigan","html_url":"https://github.com/KeeganCorrigan","followers_url":"https://api.github.com/users/KeeganCorrigan/followers","following_url":"https://api.github.com/users/KeeganCorrigan/following{/other_user}","gists_url":"https://api.github.com/users/KeeganCorrigan/gists{/gist_id}","starred_url":"https://api.github.com/users/KeeganCorrigan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KeeganCorrigan/subscriptions","organizations_url":"https://api.github.com/users/KeeganCorrigan/orgs","repos_url":"https://api.github.com/users/KeeganCorrigan/repos","events_url":"https://api.github.com/users/KeeganCorrigan/events{/privacy}","received_events_url":"https://api.github.com/users/KeeganCorrigan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KeeganCorrigan/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/KeeganCorrigan/black_thursday","forks_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/forks","keys_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/teams","hooks_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/events","assignees_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/tags","blobs_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/languages","stargazers_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/subscription","commits_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/merges","archive_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/downloads","issues_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/KeeganCorrigan/black_thursday/deployments","created_at":"2018-05-25T18:57:42Z","updated_at":"2018-05-30T05:47:04Z","pushed_at":"2018-05-30T05:47:06Z","git_url":"git://github.com/KeeganCorrigan/black_thursday.git","ssh_url":"git@github.com:KeeganCorrigan/black_thursday.git","clone_url":"https://github.com/KeeganCorrigan/black_thursday.git","svn_url":"https://github.com/KeeganCorrigan/black_thursday","homepage":null,"size":1718,"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":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KeeganCorrigan/black_thursday/pulls/6"},"html":{"href":"https://github.com/KeeganCorrigan/black_thursday/pull/6"},"issue":{"href":"https://api.github.com/repos/KeeganCorrigan/black_thursday/issues/6"},"comments":{"href":"https://api.github.com/repos/KeeganCorrigan/black_thursday/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/KeeganCorrigan/black_thursday/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/KeeganCorrigan/black_thursday/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KeeganCorrigan/black_thursday/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/KeeganCorrigan/black_thursday/statuses/58af682a0c3d16b409c177a8d0f6d34f2bf1c364"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}