{"action":"created","comment":{"url":"https://api.github.com/repos/tleskin/dinner-dash/pulls/comments/29880394","id":29880394,"diff_hunk":"@@ -41,4 +41,36 @@\n     end\n   end\n \n+  context \"with admin logged in\" do\n+    it \"cannot create a category that has already been created\" do\n+      admin = create(:admin_user)\n+      category = create(:category)\n+      allow_any_instance_of(ApplicationController)\n+        .to receive(:current_user)\n+        .and_return(admin)\n+\n+      visit admin_categories_path\n+      click_button \"Create Category\"\n+      fill_in \"Name\", with: \"main course\"\n+      fill_in \"Description\", with: \"for main course items\"\n+      click_button \"Create Category\"\n+      expect(page).to have_content(\"Name has already been taken, Description has already been taken\")\n+    end\n+  end\n+\n+  context \"with admin logged in\" do\n+    it \"cannot create a category that is blank\" do\n+      admin = create(:admin_user)\n+      allow_any_instance_of(ApplicationController)\n+        .to receive(:current_user)\n+        .and_return(admin)\n+\n+      visit admin_categories_path\n+      click_button \"Create Category\"\n+      fill_in \"Name\", with: \"\"\n+      fill_in \"Description\", with: \"\"\n+      click_button \"Create Category\"\n+      expect(page).to have_content(\"Name can't be blank, Description can't be blank\")","path":"spec/features/admin/admin_can_create_category_spec.rb","position":41,"original_position":41,"commit_id":"0a08be5a4994381564b5a3344b912c208fe7885a","original_commit_id":"0a08be5a4994381564b5a3344b912c208fe7885a","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. [85/80]","created_at":"2015-05-07T18:20:48Z","updated_at":"2015-05-07T18:20:48Z","html_url":"https://github.com/tleskin/dinner-dash/pull/134#discussion_r29880394","pull_request_url":"https://api.github.com/repos/tleskin/dinner-dash/pulls/134","_links":{"self":{"href":"https://api.github.com/repos/tleskin/dinner-dash/pulls/comments/29880394"},"html":{"href":"https://github.com/tleskin/dinner-dash/pull/134#discussion_r29880394"},"pull_request":{"href":"https://api.github.com/repos/tleskin/dinner-dash/pulls/134"}}},"pull_request":{"url":"https://api.github.com/repos/tleskin/dinner-dash/pulls/134","id":34943300,"html_url":"https://github.com/tleskin/dinner-dash/pull/134","diff_url":"https://github.com/tleskin/dinner-dash/pull/134.diff","patch_url":"https://github.com/tleskin/dinner-dash/pull/134.patch","issue_url":"https://api.github.com/repos/tleskin/dinner-dash/issues/134","number":134,"state":"open","locked":false,"title":"Update categories test","user":{"login":"mihir787","id":9877504,"avatar_url":"https://avatars.githubusercontent.com/u/9877504?v=3","gravatar_id":"","url":"https://api.github.com/users/mihir787","html_url":"https://github.com/mihir787","followers_url":"https://api.github.com/users/mihir787/followers","following_url":"https://api.github.com/users/mihir787/following{/other_user}","gists_url":"https://api.github.com/users/mihir787/gists{/gist_id}","starred_url":"https://api.github.com/users/mihir787/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mihir787/subscriptions","organizations_url":"https://api.github.com/users/mihir787/orgs","repos_url":"https://api.github.com/users/mihir787/repos","events_url":"https://api.github.com/users/mihir787/events{/privacy}","received_events_url":"https://api.github.com/users/mihir787/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-07T18:20:40Z","updated_at":"2015-05-07T18:20:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cbe194979d8da61dcbad34c93318e097e8a3e2e0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tleskin/dinner-dash/pulls/134/commits","review_comments_url":"https://api.github.com/repos/tleskin/dinner-dash/pulls/134/comments","review_comment_url":"https://api.github.com/repos/tleskin/dinner-dash/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tleskin/dinner-dash/issues/134/comments","statuses_url":"https://api.github.com/repos/tleskin/dinner-dash/statuses/0a08be5a4994381564b5a3344b912c208fe7885a","head":{"label":"tleskin:update_categories_test","ref":"update_categories_test","sha":"0a08be5a4994381564b5a3344b912c208fe7885a","user":{"login":"tleskin","id":5550155,"avatar_url":"https://avatars.githubusercontent.com/u/5550155?v=3","gravatar_id":"","url":"https://api.github.com/users/tleskin","html_url":"https://github.com/tleskin","followers_url":"https://api.github.com/users/tleskin/followers","following_url":"https://api.github.com/users/tleskin/following{/other_user}","gists_url":"https://api.github.com/users/tleskin/gists{/gist_id}","starred_url":"https://api.github.com/users/tleskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tleskin/subscriptions","organizations_url":"https://api.github.com/users/tleskin/orgs","repos_url":"https://api.github.com/users/tleskin/repos","events_url":"https://api.github.com/users/tleskin/events{/privacy}","received_events_url":"https://api.github.com/users/tleskin/received_events","type":"User","site_admin":false},"repo":{"id":34673394,"name":"dinner-dash","full_name":"tleskin/dinner-dash","owner":{"login":"tleskin","id":5550155,"avatar_url":"https://avatars.githubusercontent.com/u/5550155?v=3","gravatar_id":"","url":"https://api.github.com/users/tleskin","html_url":"https://github.com/tleskin","followers_url":"https://api.github.com/users/tleskin/followers","following_url":"https://api.github.com/users/tleskin/following{/other_user}","gists_url":"https://api.github.com/users/tleskin/gists{/gist_id}","starred_url":"https://api.github.com/users/tleskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tleskin/subscriptions","organizations_url":"https://api.github.com/users/tleskin/orgs","repos_url":"https://api.github.com/users/tleskin/repos","events_url":"https://api.github.com/users/tleskin/events{/privacy}","received_events_url":"https://api.github.com/users/tleskin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tleskin/dinner-dash","description":"","fork":false,"url":"https://api.github.com/repos/tleskin/dinner-dash","forks_url":"https://api.github.com/repos/tleskin/dinner-dash/forks","keys_url":"https://api.github.com/repos/tleskin/dinner-dash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tleskin/dinner-dash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tleskin/dinner-dash/teams","hooks_url":"https://api.github.com/repos/tleskin/dinner-dash/hooks","issue_events_url":"https://api.github.com/repos/tleskin/dinner-dash/issues/events{/number}","events_url":"https://api.github.com/repos/tleskin/dinner-dash/events","assignees_url":"https://api.github.com/repos/tleskin/dinner-dash/assignees{/user}","branches_url":"https://api.github.com/repos/tleskin/dinner-dash/branches{/branch}","tags_url":"https://api.github.com/repos/tleskin/dinner-dash/tags","blobs_url":"https://api.github.com/repos/tleskin/dinner-dash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tleskin/dinner-dash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tleskin/dinner-dash/git/refs{/sha}","trees_url":"https://api.github.com/repos/tleskin/dinner-dash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tleskin/dinner-dash/statuses/{sha}","languages_url":"https://api.github.com/repos/tleskin/dinner-dash/languages","stargazers_url":"https://api.github.com/repos/tleskin/dinner-dash/stargazers","contributors_url":"https://api.github.com/repos/tleskin/dinner-dash/contributors","subscribers_url":"https://api.github.com/repos/tleskin/dinner-dash/subscribers","subscription_url":"https://api.github.com/repos/tleskin/dinner-dash/subscription","commits_url":"https://api.github.com/repos/tleskin/dinner-dash/commits{/sha}","git_commits_url":"https://api.github.com/repos/tleskin/dinner-dash/git/commits{/sha}","comments_url":"https://api.github.com/repos/tleskin/dinner-dash/comments{/number}","issue_comment_url":"https://api.github.com/repos/tleskin/dinner-dash/issues/comments{/number}","contents_url":"https://api.github.com/repos/tleskin/dinner-dash/contents/{+path}","compare_url":"https://api.github.com/repos/tleskin/dinner-dash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tleskin/dinner-dash/merges","archive_url":"https://api.github.com/repos/tleskin/dinner-dash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tleskin/dinner-dash/downloads","issues_url":"https://api.github.com/repos/tleskin/dinner-dash/issues{/number}","pulls_url":"https://api.github.com/repos/tleskin/dinner-dash/pulls{/number}","milestones_url":"https://api.github.com/repos/tleskin/dinner-dash/milestones{/number}","notifications_url":"https://api.github.com/repos/tleskin/dinner-dash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tleskin/dinner-dash/labels{/name}","releases_url":"https://api.github.com/repos/tleskin/dinner-dash/releases{/id}","created_at":"2015-04-27T15:03:09Z","updated_at":"2015-05-07T18:14:30Z","pushed_at":"2015-05-07T18:20:40Z","git_url":"git://github.com/tleskin/dinner-dash.git","ssh_url":"git@github.com:tleskin/dinner-dash.git","clone_url":"https://github.com/tleskin/dinner-dash.git","svn_url":"https://github.com/tleskin/dinner-dash","homepage":null,"size":4244,"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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"tleskin:master","ref":"master","sha":"bcb61468275b419fe5bcc25a6bddea43d9ee1a34","user":{"login":"tleskin","id":5550155,"avatar_url":"https://avatars.githubusercontent.com/u/5550155?v=3","gravatar_id":"","url":"https://api.github.com/users/tleskin","html_url":"https://github.com/tleskin","followers_url":"https://api.github.com/users/tleskin/followers","following_url":"https://api.github.com/users/tleskin/following{/other_user}","gists_url":"https://api.github.com/users/tleskin/gists{/gist_id}","starred_url":"https://api.github.com/users/tleskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tleskin/subscriptions","organizations_url":"https://api.github.com/users/tleskin/orgs","repos_url":"https://api.github.com/users/tleskin/repos","events_url":"https://api.github.com/users/tleskin/events{/privacy}","received_events_url":"https://api.github.com/users/tleskin/received_events","type":"User","site_admin":false},"repo":{"id":34673394,"name":"dinner-dash","full_name":"tleskin/dinner-dash","owner":{"login":"tleskin","id":5550155,"avatar_url":"https://avatars.githubusercontent.com/u/5550155?v=3","gravatar_id":"","url":"https://api.github.com/users/tleskin","html_url":"https://github.com/tleskin","followers_url":"https://api.github.com/users/tleskin/followers","following_url":"https://api.github.com/users/tleskin/following{/other_user}","gists_url":"https://api.github.com/users/tleskin/gists{/gist_id}","starred_url":"https://api.github.com/users/tleskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tleskin/subscriptions","organizations_url":"https://api.github.com/users/tleskin/orgs","repos_url":"https://api.github.com/users/tleskin/repos","events_url":"https://api.github.com/users/tleskin/events{/privacy}","received_events_url":"https://api.github.com/users/tleskin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tleskin/dinner-dash","description":"","fork":false,"url":"https://api.github.com/repos/tleskin/dinner-dash","forks_url":"https://api.github.com/repos/tleskin/dinner-dash/forks","keys_url":"https://api.github.com/repos/tleskin/dinner-dash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tleskin/dinner-dash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tleskin/dinner-dash/teams","hooks_url":"https://api.github.com/repos/tleskin/dinner-dash/hooks","issue_events_url":"https://api.github.com/repos/tleskin/dinner-dash/issues/events{/number}","events_url":"https://api.github.com/repos/tleskin/dinner-dash/events","assignees_url":"https://api.github.com/repos/tleskin/dinner-dash/assignees{/user}","branches_url":"https://api.github.com/repos/tleskin/dinner-dash/branches{/branch}","tags_url":"https://api.github.com/repos/tleskin/dinner-dash/tags","blobs_url":"https://api.github.com/repos/tleskin/dinner-dash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tleskin/dinner-dash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tleskin/dinner-dash/git/refs{/sha}","trees_url":"https://api.github.com/repos/tleskin/dinner-dash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tleskin/dinner-dash/statuses/{sha}","languages_url":"https://api.github.com/repos/tleskin/dinner-dash/languages","stargazers_url":"https://api.github.com/repos/tleskin/dinner-dash/stargazers","contributors_url":"https://api.github.com/repos/tleskin/dinner-dash/contributors","subscribers_url":"https://api.github.com/repos/tleskin/dinner-dash/subscribers","subscription_url":"https://api.github.com/repos/tleskin/dinner-dash/subscription","commits_url":"https://api.github.com/repos/tleskin/dinner-dash/commits{/sha}","git_commits_url":"https://api.github.com/repos/tleskin/dinner-dash/git/commits{/sha}","comments_url":"https://api.github.com/repos/tleskin/dinner-dash/comments{/number}","issue_comment_url":"https://api.github.com/repos/tleskin/dinner-dash/issues/comments{/number}","contents_url":"https://api.github.com/repos/tleskin/dinner-dash/contents/{+path}","compare_url":"https://api.github.com/repos/tleskin/dinner-dash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tleskin/dinner-dash/merges","archive_url":"https://api.github.com/repos/tleskin/dinner-dash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tleskin/dinner-dash/downloads","issues_url":"https://api.github.com/repos/tleskin/dinner-dash/issues{/number}","pulls_url":"https://api.github.com/repos/tleskin/dinner-dash/pulls{/number}","milestones_url":"https://api.github.com/repos/tleskin/dinner-dash/milestones{/number}","notifications_url":"https://api.github.com/repos/tleskin/dinner-dash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tleskin/dinner-dash/labels{/name}","releases_url":"https://api.github.com/repos/tleskin/dinner-dash/releases{/id}","created_at":"2015-04-27T15:03:09Z","updated_at":"2015-05-07T18:14:30Z","pushed_at":"2015-05-07T18:20:40Z","git_url":"git://github.com/tleskin/dinner-dash.git","ssh_url":"git@github.com:tleskin/dinner-dash.git","clone_url":"https://github.com/tleskin/dinner-dash.git","svn_url":"https://github.com/tleskin/dinner-dash","homepage":null,"size":4244,"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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tleskin/dinner-dash/pulls/134"},"html":{"href":"https://github.com/tleskin/dinner-dash/pull/134"},"issue":{"href":"https://api.github.com/repos/tleskin/dinner-dash/issues/134"},"comments":{"href":"https://api.github.com/repos/tleskin/dinner-dash/issues/134/comments"},"review_comments":{"href":"https://api.github.com/repos/tleskin/dinner-dash/pulls/134/comments"},"review_comment":{"href":"https://api.github.com/repos/tleskin/dinner-dash/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tleskin/dinner-dash/pulls/134/commits"},"statuses":{"href":"https://api.github.com/repos/tleskin/dinner-dash/statuses/0a08be5a4994381564b5a3344b912c208fe7885a"}}}}