{"action":"created","comment":{"url":"https://api.github.com/repos/martensonbj/little_shop/pulls/comments/49917753","id":49917753,"diff_hunk":"@@ -0,0 +1,44 @@\n+require \"test_helper\"\n+\n+class AdminUserCreatesItemTest < ActionDispatch::IntegrationTest\n+  test \"admin creates a item\" do\n+    admin = User.create(first_name: \"Admin\",\n+                     last_name: \"Admin\",\n+                     username: \"admin\",\n+                     password: \"password\",\n+                     role: 2)\n+    user = User.create(first_name: \"Mofo\",\n+                      last_name: \"bitch\",\n+                      username: \"mofo\",\n+                      password: \"ass\",\n+                      role: 1)\n+\n+    category1, category2, category3 =\n+            create_list(:category, 3)\n+    ApplicationController.any_instance.stubs(:current_user).returns(admin)\n+\n+    visit admin_dashboard_path\n+    click_on \"Create Item\"\n+    assert_equal new_admin_item_path, current_path\n+    fill_in \"Title\", with: \"Meat\"\n+    fill_in \"Image path\", with: \"https://petenelson.com/wp-content/uploads/2011/08/ron-swanson-meat.jpg\"","path":"test/integration/admin_user_creates_item_test.rb","position":24,"original_position":24,"commit_id":"889ef355130f3d6d24825a68cabf53d38f35bec3","original_commit_id":"889ef355130f3d6d24825a68cabf53d38f35bec3","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Line is too long. [104/80]","created_at":"2016-01-15T23:28:26Z","updated_at":"2016-01-15T23:28:26Z","html_url":"https://github.com/martensonbj/little_shop/pull/90#discussion_r49917753","pull_request_url":"https://api.github.com/repos/martensonbj/little_shop/pulls/90","_links":{"self":{"href":"https://api.github.com/repos/martensonbj/little_shop/pulls/comments/49917753"},"html":{"href":"https://github.com/martensonbj/little_shop/pull/90#discussion_r49917753"},"pull_request":{"href":"https://api.github.com/repos/martensonbj/little_shop/pulls/90"}}},"pull_request":{"url":"https://api.github.com/repos/martensonbj/little_shop/pulls/90","id":56234787,"html_url":"https://github.com/martensonbj/little_shop/pull/90","diff_url":"https://github.com/martensonbj/little_shop/pull/90.diff","patch_url":"https://github.com/martensonbj/little_shop/pull/90.patch","issue_url":"https://api.github.com/repos/martensonbj/little_shop/issues/90","number":90,"state":"open","locked":false,"title":"Add create item function for admin","user":{"login":"Tman22","id":10391202,"avatar_url":"https://avatars.githubusercontent.com/u/10391202?v=3","gravatar_id":"","url":"https://api.github.com/users/Tman22","html_url":"https://github.com/Tman22","followers_url":"https://api.github.com/users/Tman22/followers","following_url":"https://api.github.com/users/Tman22/following{/other_user}","gists_url":"https://api.github.com/users/Tman22/gists{/gist_id}","starred_url":"https://api.github.com/users/Tman22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tman22/subscriptions","organizations_url":"https://api.github.com/users/Tman22/orgs","repos_url":"https://api.github.com/users/Tman22/repos","events_url":"https://api.github.com/users/Tman22/events{/privacy}","received_events_url":"https://api.github.com/users/Tman22/received_events","type":"User","site_admin":false},"body":"Admin can choose artist and category while creating item.","created_at":"2016-01-15T23:28:22Z","updated_at":"2016-01-15T23:28:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa955e1a14ab8d92d1094027cc30a730f350edcf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/martensonbj/little_shop/pulls/90/commits","review_comments_url":"https://api.github.com/repos/martensonbj/little_shop/pulls/90/comments","review_comment_url":"https://api.github.com/repos/martensonbj/little_shop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/martensonbj/little_shop/issues/90/comments","statuses_url":"https://api.github.com/repos/martensonbj/little_shop/statuses/889ef355130f3d6d24825a68cabf53d38f35bec3","head":{"label":"martensonbj:76_admin_item_creation","ref":"76_admin_item_creation","sha":"889ef355130f3d6d24825a68cabf53d38f35bec3","user":{"login":"martensonbj","id":13123158,"avatar_url":"https://avatars.githubusercontent.com/u/13123158?v=3","gravatar_id":"","url":"https://api.github.com/users/martensonbj","html_url":"https://github.com/martensonbj","followers_url":"https://api.github.com/users/martensonbj/followers","following_url":"https://api.github.com/users/martensonbj/following{/other_user}","gists_url":"https://api.github.com/users/martensonbj/gists{/gist_id}","starred_url":"https://api.github.com/users/martensonbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martensonbj/subscriptions","organizations_url":"https://api.github.com/users/martensonbj/orgs","repos_url":"https://api.github.com/users/martensonbj/repos","events_url":"https://api.github.com/users/martensonbj/events{/privacy}","received_events_url":"https://api.github.com/users/martensonbj/received_events","type":"User","site_admin":false},"repo":{"id":49446077,"name":"little_shop","full_name":"martensonbj/little_shop","owner":{"login":"martensonbj","id":13123158,"avatar_url":"https://avatars.githubusercontent.com/u/13123158?v=3","gravatar_id":"","url":"https://api.github.com/users/martensonbj","html_url":"https://github.com/martensonbj","followers_url":"https://api.github.com/users/martensonbj/followers","following_url":"https://api.github.com/users/martensonbj/following{/other_user}","gists_url":"https://api.github.com/users/martensonbj/gists{/gist_id}","starred_url":"https://api.github.com/users/martensonbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martensonbj/subscriptions","organizations_url":"https://api.github.com/users/martensonbj/orgs","repos_url":"https://api.github.com/users/martensonbj/repos","events_url":"https://api.github.com/users/martensonbj/events{/privacy}","received_events_url":"https://api.github.com/users/martensonbj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/martensonbj/little_shop","description":null,"fork":false,"url":"https://api.github.com/repos/martensonbj/little_shop","forks_url":"https://api.github.com/repos/martensonbj/little_shop/forks","keys_url":"https://api.github.com/repos/martensonbj/little_shop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martensonbj/little_shop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martensonbj/little_shop/teams","hooks_url":"https://api.github.com/repos/martensonbj/little_shop/hooks","issue_events_url":"https://api.github.com/repos/martensonbj/little_shop/issues/events{/number}","events_url":"https://api.github.com/repos/martensonbj/little_shop/events","assignees_url":"https://api.github.com/repos/martensonbj/little_shop/assignees{/user}","branches_url":"https://api.github.com/repos/martensonbj/little_shop/branches{/branch}","tags_url":"https://api.github.com/repos/martensonbj/little_shop/tags","blobs_url":"https://api.github.com/repos/martensonbj/little_shop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martensonbj/little_shop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martensonbj/little_shop/git/refs{/sha}","trees_url":"https://api.github.com/repos/martensonbj/little_shop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martensonbj/little_shop/statuses/{sha}","languages_url":"https://api.github.com/repos/martensonbj/little_shop/languages","stargazers_url":"https://api.github.com/repos/martensonbj/little_shop/stargazers","contributors_url":"https://api.github.com/repos/martensonbj/little_shop/contributors","subscribers_url":"https://api.github.com/repos/martensonbj/little_shop/subscribers","subscription_url":"https://api.github.com/repos/martensonbj/little_shop/subscription","commits_url":"https://api.github.com/repos/martensonbj/little_shop/commits{/sha}","git_commits_url":"https://api.github.com/repos/martensonbj/little_shop/git/commits{/sha}","comments_url":"https://api.github.com/repos/martensonbj/little_shop/comments{/number}","issue_comment_url":"https://api.github.com/repos/martensonbj/little_shop/issues/comments{/number}","contents_url":"https://api.github.com/repos/martensonbj/little_shop/contents/{+path}","compare_url":"https://api.github.com/repos/martensonbj/little_shop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martensonbj/little_shop/merges","archive_url":"https://api.github.com/repos/martensonbj/little_shop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martensonbj/little_shop/downloads","issues_url":"https://api.github.com/repos/martensonbj/little_shop/issues{/number}","pulls_url":"https://api.github.com/repos/martensonbj/little_shop/pulls{/number}","milestones_url":"https://api.github.com/repos/martensonbj/little_shop/milestones{/number}","notifications_url":"https://api.github.com/repos/martensonbj/little_shop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martensonbj/little_shop/labels{/name}","releases_url":"https://api.github.com/repos/martensonbj/little_shop/releases{/id}","created_at":"2016-01-11T18:37:54Z","updated_at":"2016-01-11T18:40:37Z","pushed_at":"2016-01-15T23:28:23Z","git_url":"git://github.com/martensonbj/little_shop.git","ssh_url":"git@github.com:martensonbj/little_shop.git","clone_url":"https://github.com/martensonbj/little_shop.git","svn_url":"https://github.com/martensonbj/little_shop","homepage":null,"size":2776,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":15,"forks":0,"open_issues":15,"watchers":2,"default_branch":"master"}},"base":{"label":"martensonbj:master","ref":"master","sha":"bcc9b454e5c85335c4b5153c8f87945b25a01334","user":{"login":"martensonbj","id":13123158,"avatar_url":"https://avatars.githubusercontent.com/u/13123158?v=3","gravatar_id":"","url":"https://api.github.com/users/martensonbj","html_url":"https://github.com/martensonbj","followers_url":"https://api.github.com/users/martensonbj/followers","following_url":"https://api.github.com/users/martensonbj/following{/other_user}","gists_url":"https://api.github.com/users/martensonbj/gists{/gist_id}","starred_url":"https://api.github.com/users/martensonbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martensonbj/subscriptions","organizations_url":"https://api.github.com/users/martensonbj/orgs","repos_url":"https://api.github.com/users/martensonbj/repos","events_url":"https://api.github.com/users/martensonbj/events{/privacy}","received_events_url":"https://api.github.com/users/martensonbj/received_events","type":"User","site_admin":false},"repo":{"id":49446077,"name":"little_shop","full_name":"martensonbj/little_shop","owner":{"login":"martensonbj","id":13123158,"avatar_url":"https://avatars.githubusercontent.com/u/13123158?v=3","gravatar_id":"","url":"https://api.github.com/users/martensonbj","html_url":"https://github.com/martensonbj","followers_url":"https://api.github.com/users/martensonbj/followers","following_url":"https://api.github.com/users/martensonbj/following{/other_user}","gists_url":"https://api.github.com/users/martensonbj/gists{/gist_id}","starred_url":"https://api.github.com/users/martensonbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martensonbj/subscriptions","organizations_url":"https://api.github.com/users/martensonbj/orgs","repos_url":"https://api.github.com/users/martensonbj/repos","events_url":"https://api.github.com/users/martensonbj/events{/privacy}","received_events_url":"https://api.github.com/users/martensonbj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/martensonbj/little_shop","description":null,"fork":false,"url":"https://api.github.com/repos/martensonbj/little_shop","forks_url":"https://api.github.com/repos/martensonbj/little_shop/forks","keys_url":"https://api.github.com/repos/martensonbj/little_shop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martensonbj/little_shop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martensonbj/little_shop/teams","hooks_url":"https://api.github.com/repos/martensonbj/little_shop/hooks","issue_events_url":"https://api.github.com/repos/martensonbj/little_shop/issues/events{/number}","events_url":"https://api.github.com/repos/martensonbj/little_shop/events","assignees_url":"https://api.github.com/repos/martensonbj/little_shop/assignees{/user}","branches_url":"https://api.github.com/repos/martensonbj/little_shop/branches{/branch}","tags_url":"https://api.github.com/repos/martensonbj/little_shop/tags","blobs_url":"https://api.github.com/repos/martensonbj/little_shop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martensonbj/little_shop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martensonbj/little_shop/git/refs{/sha}","trees_url":"https://api.github.com/repos/martensonbj/little_shop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martensonbj/little_shop/statuses/{sha}","languages_url":"https://api.github.com/repos/martensonbj/little_shop/languages","stargazers_url":"https://api.github.com/repos/martensonbj/little_shop/stargazers","contributors_url":"https://api.github.com/repos/martensonbj/little_shop/contributors","subscribers_url":"https://api.github.com/repos/martensonbj/little_shop/subscribers","subscription_url":"https://api.github.com/repos/martensonbj/little_shop/subscription","commits_url":"https://api.github.com/repos/martensonbj/little_shop/commits{/sha}","git_commits_url":"https://api.github.com/repos/martensonbj/little_shop/git/commits{/sha}","comments_url":"https://api.github.com/repos/martensonbj/little_shop/comments{/number}","issue_comment_url":"https://api.github.com/repos/martensonbj/little_shop/issues/comments{/number}","contents_url":"https://api.github.com/repos/martensonbj/little_shop/contents/{+path}","compare_url":"https://api.github.com/repos/martensonbj/little_shop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martensonbj/little_shop/merges","archive_url":"https://api.github.com/repos/martensonbj/little_shop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martensonbj/little_shop/downloads","issues_url":"https://api.github.com/repos/martensonbj/little_shop/issues{/number}","pulls_url":"https://api.github.com/repos/martensonbj/little_shop/pulls{/number}","milestones_url":"https://api.github.com/repos/martensonbj/little_shop/milestones{/number}","notifications_url":"https://api.github.com/repos/martensonbj/little_shop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martensonbj/little_shop/labels{/name}","releases_url":"https://api.github.com/repos/martensonbj/little_shop/releases{/id}","created_at":"2016-01-11T18:37:54Z","updated_at":"2016-01-11T18:40:37Z","pushed_at":"2016-01-15T23:28:23Z","git_url":"git://github.com/martensonbj/little_shop.git","ssh_url":"git@github.com:martensonbj/little_shop.git","clone_url":"https://github.com/martensonbj/little_shop.git","svn_url":"https://github.com/martensonbj/little_shop","homepage":null,"size":2776,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":15,"forks":0,"open_issues":15,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/martensonbj/little_shop/pulls/90"},"html":{"href":"https://github.com/martensonbj/little_shop/pull/90"},"issue":{"href":"https://api.github.com/repos/martensonbj/little_shop/issues/90"},"comments":{"href":"https://api.github.com/repos/martensonbj/little_shop/issues/90/comments"},"review_comments":{"href":"https://api.github.com/repos/martensonbj/little_shop/pulls/90/comments"},"review_comment":{"href":"https://api.github.com/repos/martensonbj/little_shop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/martensonbj/little_shop/pulls/90/commits"},"statuses":{"href":"https://api.github.com/repos/martensonbj/little_shop/statuses/889ef355130f3d6d24825a68cabf53d38f35bec3"}}}}