{"action":"created","comment":{"url":"https://api.github.com/repos/asmolentzov/black_thursday/pulls/comments/227960940","pull_request_review_id":168121258,"id":227960940,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzk2MDk0MA==","diff_hunk":"@@ -20,16 +20,71 @@ def test_sales_can_make_merchant_repo_instance\n     assert_instance_of MerchantRepository, se.merchants\n   end\n \n-  def test_sales_can_make_item_repo_instance\n-    skip\n+  def test_it_can_make_item_repo_instance\n+    se = SalesEngine.from_csv({\n+    :items     => \"./data/items.csv\",\n+    :merchants => \"./data/merchants.csv\",\n+    })\n \n+    assert_instance_of ItemRepository, se.items\n   end\n \n   def test_that_merchant_repo_contains_merchants\n     skip\n+    se = SalesEngine.from_csv({\n+    :items     => \"./data/items.csv\",\n+    :merchants => \"./data/merchants.csv\",\n+    })\n+\n+    refute_equal 0, se.merchants.all.size\n+\n   end\n \n   def test_that_item_repo_contains_items\n-    skip\n+    se = SalesEngine.from_csv({\n+    :items     => \"./data/items.csv\",\n+    :merchants => \"./data/merchants.csv\",\n+    })\n+\n+    refute_equal 1, se.items.all\n+  end\n+\n+  def test_that_sales_engine_can_pass_info\n+    @merchant_1 = Merchant.new({id: 5, name: 'Steve'})\n+    @merchant_2 = Merchant.new({id: 10, name: 'Turing School'})\n+    @merchant_3 = Merchant.new({id: 7, name: 'Turk'})\n+    @merchants = [@merchant_1, @merchant_2, @merchant_3]\n+\n+    @item_1 = Item.new({\n+              :id          => 1,\n+              :name        => \"Pencil\",\n+              :description => \"You can use it to write things\",\n+              :unit_price  => BigDecimal.new(10.99,4),\n+              :created_at  => @time,\n+              :updated_at  => @time,\n+              :merchant_id => 2\n+            })\n+\n+    @item_2 = Item.new({\n+              :id          => 2,\n+              :name        => \"Pen\",\n+              :description => \"You can use it to write things in ink!\",\n+              :unit_price  => BigDecimal.new(32.99,4),\n+              :created_at  => Time.now,\n+              :updated_at  => Time.now,\n+              :merchant_id => 3\n+            })\n+    @items = [@item_1, @item_2]\n+\n+\n+    se = SalesEngine.from_csv({\n+    :items     => @items,","path":"test/sales_engine_test.rb","position":80,"original_position":80,"commit_id":"c85c53b5fd2617d71e1b4362b848c58217577b24","original_commit_id":"c85c53b5fd2617d71e1b4362b848c58217577b24","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/IndentHash: Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis.<br>Style/HashSyntax: Use the new Ruby 1.9 hash syntax.","created_at":"2018-10-24T21:09:54Z","updated_at":"2018-10-24T21:09:56Z","html_url":"https://github.com/asmolentzov/black_thursday/pull/19#discussion_r227960940","pull_request_url":"https://api.github.com/repos/asmolentzov/black_thursday/pulls/19","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/asmolentzov/black_thursday/pulls/comments/227960940"},"html":{"href":"https://github.com/asmolentzov/black_thursday/pull/19#discussion_r227960940"},"pull_request":{"href":"https://api.github.com/repos/asmolentzov/black_thursday/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/asmolentzov/black_thursday/pulls/19","id":225551519,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1NTUxNTE5","html_url":"https://github.com/asmolentzov/black_thursday/pull/19","diff_url":"https://github.com/asmolentzov/black_thursday/pull/19.diff","patch_url":"https://github.com/asmolentzov/black_thursday/pull/19.patch","issue_url":"https://api.github.com/repos/asmolentzov/black_thursday/issues/19","number":19,"state":"open","locked":false,"title":"Sales engine","user":{"login":"nicovigil1","id":43397150,"node_id":"MDQ6VXNlcjQzMzk3MTUw","avatar_url":"https://avatars0.githubusercontent.com/u/43397150?v=4","gravatar_id":"","url":"https://api.github.com/users/nicovigil1","html_url":"https://github.com/nicovigil1","followers_url":"https://api.github.com/users/nicovigil1/followers","following_url":"https://api.github.com/users/nicovigil1/following{/other_user}","gists_url":"https://api.github.com/users/nicovigil1/gists{/gist_id}","starred_url":"https://api.github.com/users/nicovigil1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicovigil1/subscriptions","organizations_url":"https://api.github.com/users/nicovigil1/orgs","repos_url":"https://api.github.com/users/nicovigil1/repos","events_url":"https://api.github.com/users/nicovigil1/events{/privacy}","received_events_url":"https://api.github.com/users/nicovigil1/received_events","type":"User","site_admin":false},"body":"Created sales engine tests and functionality, and made major changes to merchant repository to support it. Merchant Repo now takes in CSV as well as passes rspec tests. \r\nDriver - Navigator with Anna and Vince","created_at":"2018-10-24T21:09:02Z","updated_at":"2018-10-24T21:09:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7ff19711e730dec6edcca61efc4247996c69e83","assignee":null,"assignees":[],"requested_reviewers":[{"login":"asmolentzov","id":6686861,"node_id":"MDQ6VXNlcjY2ODY4NjE=","avatar_url":"https://avatars2.githubusercontent.com/u/6686861?v=4","gravatar_id":"","url":"https://api.github.com/users/asmolentzov","html_url":"https://github.com/asmolentzov","followers_url":"https://api.github.com/users/asmolentzov/followers","following_url":"https://api.github.com/users/asmolentzov/following{/other_user}","gists_url":"https://api.github.com/users/asmolentzov/gists{/gist_id}","starred_url":"https://api.github.com/users/asmolentzov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asmolentzov/subscriptions","organizations_url":"https://api.github.com/users/asmolentzov/orgs","repos_url":"https://api.github.com/users/asmolentzov/repos","events_url":"https://api.github.com/users/asmolentzov/events{/privacy}","received_events_url":"https://api.github.com/users/asmolentzov/received_events","type":"User","site_admin":false},{"login":"Vjp888","id":40582072,"node_id":"MDQ6VXNlcjQwNTgyMDcy","avatar_url":"https://avatars2.githubusercontent.com/u/40582072?v=4","gravatar_id":"","url":"https://api.github.com/users/Vjp888","html_url":"https://github.com/Vjp888","followers_url":"https://api.github.com/users/Vjp888/followers","following_url":"https://api.github.com/users/Vjp888/following{/other_user}","gists_url":"https://api.github.com/users/Vjp888/gists{/gist_id}","starred_url":"https://api.github.com/users/Vjp888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vjp888/subscriptions","organizations_url":"https://api.github.com/users/Vjp888/orgs","repos_url":"https://api.github.com/users/Vjp888/repos","events_url":"https://api.github.com/users/Vjp888/events{/privacy}","received_events_url":"https://api.github.com/users/Vjp888/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1100262651,"node_id":"MDU6TGFiZWwxMTAwMjYyNjUx","url":"https://api.github.com/repos/asmolentzov/black_thursday/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/asmolentzov/black_thursday/pulls/19/commits","review_comments_url":"https://api.github.com/repos/asmolentzov/black_thursday/pulls/19/comments","review_comment_url":"https://api.github.com/repos/asmolentzov/black_thursday/pulls/comments{/number}","comments_url":"https://api.github.com/repos/asmolentzov/black_thursday/issues/19/comments","statuses_url":"https://api.github.com/repos/asmolentzov/black_thursday/statuses/c85c53b5fd2617d71e1b4362b848c58217577b24","head":{"label":"asmolentzov:sales_engine","ref":"sales_engine","sha":"c85c53b5fd2617d71e1b4362b848c58217577b24","user":{"login":"asmolentzov","id":6686861,"node_id":"MDQ6VXNlcjY2ODY4NjE=","avatar_url":"https://avatars2.githubusercontent.com/u/6686861?v=4","gravatar_id":"","url":"https://api.github.com/users/asmolentzov","html_url":"https://github.com/asmolentzov","followers_url":"https://api.github.com/users/asmolentzov/followers","following_url":"https://api.github.com/users/asmolentzov/following{/other_user}","gists_url":"https://api.github.com/users/asmolentzov/gists{/gist_id}","starred_url":"https://api.github.com/users/asmolentzov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asmolentzov/subscriptions","organizations_url":"https://api.github.com/users/asmolentzov/orgs","repos_url":"https://api.github.com/users/asmolentzov/repos","events_url":"https://api.github.com/users/asmolentzov/events{/privacy}","received_events_url":"https://api.github.com/users/asmolentzov/received_events","type":"User","site_admin":false},"repo":{"id":154176028,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQxNzYwMjg=","name":"black_thursday","full_name":"asmolentzov/black_thursday","private":false,"owner":{"login":"asmolentzov","id":6686861,"node_id":"MDQ6VXNlcjY2ODY4NjE=","avatar_url":"https://avatars2.githubusercontent.com/u/6686861?v=4","gravatar_id":"","url":"https://api.github.com/users/asmolentzov","html_url":"https://github.com/asmolentzov","followers_url":"https://api.github.com/users/asmolentzov/followers","following_url":"https://api.github.com/users/asmolentzov/following{/other_user}","gists_url":"https://api.github.com/users/asmolentzov/gists{/gist_id}","starred_url":"https://api.github.com/users/asmolentzov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asmolentzov/subscriptions","organizations_url":"https://api.github.com/users/asmolentzov/orgs","repos_url":"https://api.github.com/users/asmolentzov/repos","events_url":"https://api.github.com/users/asmolentzov/events{/privacy}","received_events_url":"https://api.github.com/users/asmolentzov/received_events","type":"User","site_admin":false},"html_url":"https://github.com/asmolentzov/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/asmolentzov/black_thursday","forks_url":"https://api.github.com/repos/asmolentzov/black_thursday/forks","keys_url":"https://api.github.com/repos/asmolentzov/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asmolentzov/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asmolentzov/black_thursday/teams","hooks_url":"https://api.github.com/repos/asmolentzov/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/asmolentzov/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/asmolentzov/black_thursday/events","assignees_url":"https://api.github.com/repos/asmolentzov/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/asmolentzov/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/asmolentzov/black_thursday/tags","blobs_url":"https://api.github.com/repos/asmolentzov/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asmolentzov/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asmolentzov/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/asmolentzov/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asmolentzov/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/asmolentzov/black_thursday/languages","stargazers_url":"https://api.github.com/repos/asmolentzov/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/asmolentzov/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/asmolentzov/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/asmolentzov/black_thursday/subscription","commits_url":"https://api.github.com/repos/asmolentzov/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/asmolentzov/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/asmolentzov/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/asmolentzov/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/asmolentzov/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/asmolentzov/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asmolentzov/black_thursday/merges","archive_url":"https://api.github.com/repos/asmolentzov/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asmolentzov/black_thursday/downloads","issues_url":"https://api.github.com/repos/asmolentzov/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/asmolentzov/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/asmolentzov/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/asmolentzov/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asmolentzov/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/asmolentzov/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/asmolentzov/black_thursday/deployments","created_at":"2018-10-22T16:19:35Z","updated_at":"2018-10-24T17:14:57Z","pushed_at":"2018-10-24T21:09:03Z","git_url":"git://github.com/asmolentzov/black_thursday.git","ssh_url":"git@github.com:asmolentzov/black_thursday.git","clone_url":"https://github.com/asmolentzov/black_thursday.git","svn_url":"https://github.com/asmolentzov/black_thursday","homepage":null,"size":1691,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":10,"license":null,"forks":0,"open_issues":10,"watchers":0,"default_branch":"master"}},"base":{"label":"asmolentzov:master","ref":"master","sha":"3e5ffe3daf4b249d15adf6553f30f7bd6a95df13","user":{"login":"asmolentzov","id":6686861,"node_id":"MDQ6VXNlcjY2ODY4NjE=","avatar_url":"https://avatars2.githubusercontent.com/u/6686861?v=4","gravatar_id":"","url":"https://api.github.com/users/asmolentzov","html_url":"https://github.com/asmolentzov","followers_url":"https://api.github.com/users/asmolentzov/followers","following_url":"https://api.github.com/users/asmolentzov/following{/other_user}","gists_url":"https://api.github.com/users/asmolentzov/gists{/gist_id}","starred_url":"https://api.github.com/users/asmolentzov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asmolentzov/subscriptions","organizations_url":"https://api.github.com/users/asmolentzov/orgs","repos_url":"https://api.github.com/users/asmolentzov/repos","events_url":"https://api.github.com/users/asmolentzov/events{/privacy}","received_events_url":"https://api.github.com/users/asmolentzov/received_events","type":"User","site_admin":false},"repo":{"id":154176028,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQxNzYwMjg=","name":"black_thursday","full_name":"asmolentzov/black_thursday","private":false,"owner":{"login":"asmolentzov","id":6686861,"node_id":"MDQ6VXNlcjY2ODY4NjE=","avatar_url":"https://avatars2.githubusercontent.com/u/6686861?v=4","gravatar_id":"","url":"https://api.github.com/users/asmolentzov","html_url":"https://github.com/asmolentzov","followers_url":"https://api.github.com/users/asmolentzov/followers","following_url":"https://api.github.com/users/asmolentzov/following{/other_user}","gists_url":"https://api.github.com/users/asmolentzov/gists{/gist_id}","starred_url":"https://api.github.com/users/asmolentzov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asmolentzov/subscriptions","organizations_url":"https://api.github.com/users/asmolentzov/orgs","repos_url":"https://api.github.com/users/asmolentzov/repos","events_url":"https://api.github.com/users/asmolentzov/events{/privacy}","received_events_url":"https://api.github.com/users/asmolentzov/received_events","type":"User","site_admin":false},"html_url":"https://github.com/asmolentzov/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/asmolentzov/black_thursday","forks_url":"https://api.github.com/repos/asmolentzov/black_thursday/forks","keys_url":"https://api.github.com/repos/asmolentzov/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asmolentzov/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asmolentzov/black_thursday/teams","hooks_url":"https://api.github.com/repos/asmolentzov/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/asmolentzov/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/asmolentzov/black_thursday/events","assignees_url":"https://api.github.com/repos/asmolentzov/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/asmolentzov/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/asmolentzov/black_thursday/tags","blobs_url":"https://api.github.com/repos/asmolentzov/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asmolentzov/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asmolentzov/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/asmolentzov/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asmolentzov/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/asmolentzov/black_thursday/languages","stargazers_url":"https://api.github.com/repos/asmolentzov/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/asmolentzov/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/asmolentzov/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/asmolentzov/black_thursday/subscription","commits_url":"https://api.github.com/repos/asmolentzov/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/asmolentzov/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/asmolentzov/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/asmolentzov/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/asmolentzov/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/asmolentzov/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asmolentzov/black_thursday/merges","archive_url":"https://api.github.com/repos/asmolentzov/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asmolentzov/black_thursday/downloads","issues_url":"https://api.github.com/repos/asmolentzov/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/asmolentzov/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/asmolentzov/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/asmolentzov/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asmolentzov/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/asmolentzov/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/asmolentzov/black_thursday/deployments","created_at":"2018-10-22T16:19:35Z","updated_at":"2018-10-24T17:14:57Z","pushed_at":"2018-10-24T21:09:03Z","git_url":"git://github.com/asmolentzov/black_thursday.git","ssh_url":"git@github.com:asmolentzov/black_thursday.git","clone_url":"https://github.com/asmolentzov/black_thursday.git","svn_url":"https://github.com/asmolentzov/black_thursday","homepage":null,"size":1691,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":10,"license":null,"forks":0,"open_issues":10,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/asmolentzov/black_thursday/pulls/19"},"html":{"href":"https://github.com/asmolentzov/black_thursday/pull/19"},"issue":{"href":"https://api.github.com/repos/asmolentzov/black_thursday/issues/19"},"comments":{"href":"https://api.github.com/repos/asmolentzov/black_thursday/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/asmolentzov/black_thursday/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/asmolentzov/black_thursday/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/asmolentzov/black_thursday/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/asmolentzov/black_thursday/statuses/c85c53b5fd2617d71e1b4362b848c58217577b24"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"houndci-bot"}}