{"action":"created","comment":{"url":"https://api.github.com/repos/andarcabrera/ebay_clone/pulls/comments/66845265","id":66845265,"diff_hunk":"@@ -0,0 +1,54 @@\n+require 'item_marketplace/create_item'\n+require 'rails_helper'\n+\n+describe CreateItem do\n+  context \"item is created succesfully\" do\n+    let(:current_user) { User.create(username: \"dreamteam\", email: \"us@dream.com\", password_hash: \"zzzzzzz\") }\n+    let(:item_params) { {name: \"ping-pong paddle\",\n+                         description: \"you beat Alex with it\",\n+                         buy_it_now_price: 1,\n+                         seller_id: current_user.id} }\n+    let(:tag_names)   { [\"fun\", \"agile\"] }\n+    let(:create_item) { CreateItem.new(item_params, current_user, tag_names) }\n+\n+    it \"returns the item\" do\n+\n+      expect(create_item.call).to eq(Item.last)\n+    end\n+\n+    it \"it saves the item in the database\" do\n+      create_item.call\n+\n+      expect(Item.last.name).to eq(\"ping-pong paddle\")\n+      expect(Item.last.seller_id).to eq(current_user.id)\n+    end\n+\n+    it \"creates tag for the item\" do\n+      create_item.call\n+\n+      expect(Item.last.tags.count).to eq(2)\n+      expect(Item.last.tags[0].name).to eq(\"fun\")\n+    end\n+  end\n+\n+  context \"item is not created succesfully\" do\n+    let(:current_user) { User.create(username: \"dreamteam\", email: \"us@dream.com\", password_hash: \"zzzzzzz\") }","path":"spec/lib/item_marketplace/create_item_spec.rb","position":35,"original_position":35,"commit_id":"4fce9d76d96d59eb8c37c4d10a89dfc6cd251f52","original_commit_id":"07d15739fbe219c681444841bf2a853a1106e631","user":{"login":"kevinbuch","id":4039018,"avatar_url":"https://avatars.githubusercontent.com/u/4039018?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinbuch","html_url":"https://github.com/kevinbuch","followers_url":"https://api.github.com/users/kevinbuch/followers","following_url":"https://api.github.com/users/kevinbuch/following{/other_user}","gists_url":"https://api.github.com/users/kevinbuch/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinbuch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinbuch/subscriptions","organizations_url":"https://api.github.com/users/kevinbuch/orgs","repos_url":"https://api.github.com/users/kevinbuch/repos","events_url":"https://api.github.com/users/kevinbuch/events{/privacy}","received_events_url":"https://api.github.com/users/kevinbuch/received_events","type":"User","site_admin":false},"body":"Why repeat the same let in each context?","created_at":"2016-06-13T18:44:58Z","updated_at":"2016-06-13T18:44:58Z","html_url":"https://github.com/andarcabrera/ebay_clone/pull/6#discussion_r66845265","pull_request_url":"https://api.github.com/repos/andarcabrera/ebay_clone/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/andarcabrera/ebay_clone/pulls/comments/66845265"},"html":{"href":"https://github.com/andarcabrera/ebay_clone/pull/6#discussion_r66845265"},"pull_request":{"href":"https://api.github.com/repos/andarcabrera/ebay_clone/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/andarcabrera/ebay_clone/pulls/6","id":73404244,"html_url":"https://github.com/andarcabrera/ebay_clone/pull/6","diff_url":"https://github.com/andarcabrera/ebay_clone/pull/6.diff","patch_url":"https://github.com/andarcabrera/ebay_clone/pull/6.patch","issue_url":"https://api.github.com/repos/andarcabrera/ebay_clone/issues/6","number":6,"state":"open","locked":false,"title":"Tags","user":{"login":"andarcabrera","id":11791558,"avatar_url":"https://avatars.githubusercontent.com/u/11791558?v=3","gravatar_id":"","url":"https://api.github.com/users/andarcabrera","html_url":"https://github.com/andarcabrera","followers_url":"https://api.github.com/users/andarcabrera/followers","following_url":"https://api.github.com/users/andarcabrera/following{/other_user}","gists_url":"https://api.github.com/users/andarcabrera/gists{/gist_id}","starred_url":"https://api.github.com/users/andarcabrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andarcabrera/subscriptions","organizations_url":"https://api.github.com/users/andarcabrera/orgs","repos_url":"https://api.github.com/users/andarcabrera/repos","events_url":"https://api.github.com/users/andarcabrera/events{/privacy}","received_events_url":"https://api.github.com/users/andarcabrera/received_events","type":"User","site_admin":false},"body":"Hi @alexcodreanu86 and @kevinbuch,\r\n\r\nhere is our pull request for the following story:\r\n\r\nI can tag a product with multiple categories when I create an item.\r\nIf the tag doesn't exist, then a new one is created.\r\nI can view a collection of items that have been tagged with a category.\r\n\r\n\r\nlooking forward to your feedback.\r\n\r\nJerome & Anda","created_at":"2016-06-10T16:57:48Z","updated_at":"2016-06-13T18:44:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e0e39a4bf2a0ae04b203329ee8bbae25c3ddf845","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/andarcabrera/ebay_clone/pulls/6/commits","review_comments_url":"https://api.github.com/repos/andarcabrera/ebay_clone/pulls/6/comments","review_comment_url":"https://api.github.com/repos/andarcabrera/ebay_clone/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andarcabrera/ebay_clone/issues/6/comments","statuses_url":"https://api.github.com/repos/andarcabrera/ebay_clone/statuses/4fce9d76d96d59eb8c37c4d10a89dfc6cd251f52","head":{"label":"andarcabrera:tags","ref":"tags","sha":"4fce9d76d96d59eb8c37c4d10a89dfc6cd251f52","user":{"login":"andarcabrera","id":11791558,"avatar_url":"https://avatars.githubusercontent.com/u/11791558?v=3","gravatar_id":"","url":"https://api.github.com/users/andarcabrera","html_url":"https://github.com/andarcabrera","followers_url":"https://api.github.com/users/andarcabrera/followers","following_url":"https://api.github.com/users/andarcabrera/following{/other_user}","gists_url":"https://api.github.com/users/andarcabrera/gists{/gist_id}","starred_url":"https://api.github.com/users/andarcabrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andarcabrera/subscriptions","organizations_url":"https://api.github.com/users/andarcabrera/orgs","repos_url":"https://api.github.com/users/andarcabrera/repos","events_url":"https://api.github.com/users/andarcabrera/events{/privacy}","received_events_url":"https://api.github.com/users/andarcabrera/received_events","type":"User","site_admin":false},"repo":{"id":58469468,"name":"ebay_clone","full_name":"andarcabrera/ebay_clone","owner":{"login":"andarcabrera","id":11791558,"avatar_url":"https://avatars.githubusercontent.com/u/11791558?v=3","gravatar_id":"","url":"https://api.github.com/users/andarcabrera","html_url":"https://github.com/andarcabrera","followers_url":"https://api.github.com/users/andarcabrera/followers","following_url":"https://api.github.com/users/andarcabrera/following{/other_user}","gists_url":"https://api.github.com/users/andarcabrera/gists{/gist_id}","starred_url":"https://api.github.com/users/andarcabrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andarcabrera/subscriptions","organizations_url":"https://api.github.com/users/andarcabrera/orgs","repos_url":"https://api.github.com/users/andarcabrera/repos","events_url":"https://api.github.com/users/andarcabrera/events{/privacy}","received_events_url":"https://api.github.com/users/andarcabrera/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andarcabrera/ebay_clone","description":"A Rails Ebay clone project","fork":false,"url":"https://api.github.com/repos/andarcabrera/ebay_clone","forks_url":"https://api.github.com/repos/andarcabrera/ebay_clone/forks","keys_url":"https://api.github.com/repos/andarcabrera/ebay_clone/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andarcabrera/ebay_clone/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andarcabrera/ebay_clone/teams","hooks_url":"https://api.github.com/repos/andarcabrera/ebay_clone/hooks","issue_events_url":"https://api.github.com/repos/andarcabrera/ebay_clone/issues/events{/number}","events_url":"https://api.github.com/repos/andarcabrera/ebay_clone/events","assignees_url":"https://api.github.com/repos/andarcabrera/ebay_clone/assignees{/user}","branches_url":"https://api.github.com/repos/andarcabrera/ebay_clone/branches{/branch}","tags_url":"https://api.github.com/repos/andarcabrera/ebay_clone/tags","blobs_url":"https://api.github.com/repos/andarcabrera/ebay_clone/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andarcabrera/ebay_clone/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andarcabrera/ebay_clone/git/refs{/sha}","trees_url":"https://api.github.com/repos/andarcabrera/ebay_clone/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andarcabrera/ebay_clone/statuses/{sha}","languages_url":"https://api.github.com/repos/andarcabrera/ebay_clone/languages","stargazers_url":"https://api.github.com/repos/andarcabrera/ebay_clone/stargazers","contributors_url":"https://api.github.com/repos/andarcabrera/ebay_clone/contributors","subscribers_url":"https://api.github.com/repos/andarcabrera/ebay_clone/subscribers","subscription_url":"https://api.github.com/repos/andarcabrera/ebay_clone/subscription","commits_url":"https://api.github.com/repos/andarcabrera/ebay_clone/commits{/sha}","git_commits_url":"https://api.github.com/repos/andarcabrera/ebay_clone/git/commits{/sha}","comments_url":"https://api.github.com/repos/andarcabrera/ebay_clone/comments{/number}","issue_comment_url":"https://api.github.com/repos/andarcabrera/ebay_clone/issues/comments{/number}","contents_url":"https://api.github.com/repos/andarcabrera/ebay_clone/contents/{+path}","compare_url":"https://api.github.com/repos/andarcabrera/ebay_clone/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andarcabrera/ebay_clone/merges","archive_url":"https://api.github.com/repos/andarcabrera/ebay_clone/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andarcabrera/ebay_clone/downloads","issues_url":"https://api.github.com/repos/andarcabrera/ebay_clone/issues{/number}","pulls_url":"https://api.github.com/repos/andarcabrera/ebay_clone/pulls{/number}","milestones_url":"https://api.github.com/repos/andarcabrera/ebay_clone/milestones{/number}","notifications_url":"https://api.github.com/repos/andarcabrera/ebay_clone/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andarcabrera/ebay_clone/labels{/name}","releases_url":"https://api.github.com/repos/andarcabrera/ebay_clone/releases{/id}","deployments_url":"https://api.github.com/repos/andarcabrera/ebay_clone/deployments","created_at":"2016-05-10T14:44:00Z","updated_at":"2016-05-10T14:47:08Z","pushed_at":"2016-06-13T16:51:10Z","git_url":"git://github.com/andarcabrera/ebay_clone.git","ssh_url":"git@github.com:andarcabrera/ebay_clone.git","clone_url":"https://github.com/andarcabrera/ebay_clone.git","svn_url":"https://github.com/andarcabrera/ebay_clone","homepage":null,"size":1807,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"andarcabrera:master","ref":"master","sha":"a0c81448b2f61ca264badbf200a0cf8d2c181840","user":{"login":"andarcabrera","id":11791558,"avatar_url":"https://avatars.githubusercontent.com/u/11791558?v=3","gravatar_id":"","url":"https://api.github.com/users/andarcabrera","html_url":"https://github.com/andarcabrera","followers_url":"https://api.github.com/users/andarcabrera/followers","following_url":"https://api.github.com/users/andarcabrera/following{/other_user}","gists_url":"https://api.github.com/users/andarcabrera/gists{/gist_id}","starred_url":"https://api.github.com/users/andarcabrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andarcabrera/subscriptions","organizations_url":"https://api.github.com/users/andarcabrera/orgs","repos_url":"https://api.github.com/users/andarcabrera/repos","events_url":"https://api.github.com/users/andarcabrera/events{/privacy}","received_events_url":"https://api.github.com/users/andarcabrera/received_events","type":"User","site_admin":false},"repo":{"id":58469468,"name":"ebay_clone","full_name":"andarcabrera/ebay_clone","owner":{"login":"andarcabrera","id":11791558,"avatar_url":"https://avatars.githubusercontent.com/u/11791558?v=3","gravatar_id":"","url":"https://api.github.com/users/andarcabrera","html_url":"https://github.com/andarcabrera","followers_url":"https://api.github.com/users/andarcabrera/followers","following_url":"https://api.github.com/users/andarcabrera/following{/other_user}","gists_url":"https://api.github.com/users/andarcabrera/gists{/gist_id}","starred_url":"https://api.github.com/users/andarcabrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andarcabrera/subscriptions","organizations_url":"https://api.github.com/users/andarcabrera/orgs","repos_url":"https://api.github.com/users/andarcabrera/repos","events_url":"https://api.github.com/users/andarcabrera/events{/privacy}","received_events_url":"https://api.github.com/users/andarcabrera/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andarcabrera/ebay_clone","description":"A Rails Ebay clone project","fork":false,"url":"https://api.github.com/repos/andarcabrera/ebay_clone","forks_url":"https://api.github.com/repos/andarcabrera/ebay_clone/forks","keys_url":"https://api.github.com/repos/andarcabrera/ebay_clone/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andarcabrera/ebay_clone/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andarcabrera/ebay_clone/teams","hooks_url":"https://api.github.com/repos/andarcabrera/ebay_clone/hooks","issue_events_url":"https://api.github.com/repos/andarcabrera/ebay_clone/issues/events{/number}","events_url":"https://api.github.com/repos/andarcabrera/ebay_clone/events","assignees_url":"https://api.github.com/repos/andarcabrera/ebay_clone/assignees{/user}","branches_url":"https://api.github.com/repos/andarcabrera/ebay_clone/branches{/branch}","tags_url":"https://api.github.com/repos/andarcabrera/ebay_clone/tags","blobs_url":"https://api.github.com/repos/andarcabrera/ebay_clone/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andarcabrera/ebay_clone/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andarcabrera/ebay_clone/git/refs{/sha}","trees_url":"https://api.github.com/repos/andarcabrera/ebay_clone/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andarcabrera/ebay_clone/statuses/{sha}","languages_url":"https://api.github.com/repos/andarcabrera/ebay_clone/languages","stargazers_url":"https://api.github.com/repos/andarcabrera/ebay_clone/stargazers","contributors_url":"https://api.github.com/repos/andarcabrera/ebay_clone/contributors","subscribers_url":"https://api.github.com/repos/andarcabrera/ebay_clone/subscribers","subscription_url":"https://api.github.com/repos/andarcabrera/ebay_clone/subscription","commits_url":"https://api.github.com/repos/andarcabrera/ebay_clone/commits{/sha}","git_commits_url":"https://api.github.com/repos/andarcabrera/ebay_clone/git/commits{/sha}","comments_url":"https://api.github.com/repos/andarcabrera/ebay_clone/comments{/number}","issue_comment_url":"https://api.github.com/repos/andarcabrera/ebay_clone/issues/comments{/number}","contents_url":"https://api.github.com/repos/andarcabrera/ebay_clone/contents/{+path}","compare_url":"https://api.github.com/repos/andarcabrera/ebay_clone/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andarcabrera/ebay_clone/merges","archive_url":"https://api.github.com/repos/andarcabrera/ebay_clone/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andarcabrera/ebay_clone/downloads","issues_url":"https://api.github.com/repos/andarcabrera/ebay_clone/issues{/number}","pulls_url":"https://api.github.com/repos/andarcabrera/ebay_clone/pulls{/number}","milestones_url":"https://api.github.com/repos/andarcabrera/ebay_clone/milestones{/number}","notifications_url":"https://api.github.com/repos/andarcabrera/ebay_clone/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andarcabrera/ebay_clone/labels{/name}","releases_url":"https://api.github.com/repos/andarcabrera/ebay_clone/releases{/id}","deployments_url":"https://api.github.com/repos/andarcabrera/ebay_clone/deployments","created_at":"2016-05-10T14:44:00Z","updated_at":"2016-05-10T14:47:08Z","pushed_at":"2016-06-13T16:51:10Z","git_url":"git://github.com/andarcabrera/ebay_clone.git","ssh_url":"git@github.com:andarcabrera/ebay_clone.git","clone_url":"https://github.com/andarcabrera/ebay_clone.git","svn_url":"https://github.com/andarcabrera/ebay_clone","homepage":null,"size":1807,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andarcabrera/ebay_clone/pulls/6"},"html":{"href":"https://github.com/andarcabrera/ebay_clone/pull/6"},"issue":{"href":"https://api.github.com/repos/andarcabrera/ebay_clone/issues/6"},"comments":{"href":"https://api.github.com/repos/andarcabrera/ebay_clone/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/andarcabrera/ebay_clone/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/andarcabrera/ebay_clone/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andarcabrera/ebay_clone/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/andarcabrera/ebay_clone/statuses/4fce9d76d96d59eb8c37c4d10a89dfc6cd251f52"}}}}
{"actor":{"display_login":"kevinbuch"}}