{"action":"created","comment":{"url":"https://api.github.com/repos/davidwessman/workshop/pulls/comments/32380913","id":32380913,"diff_hunk":"@@ -0,0 +1,125 @@\n+require \"rails_helper\"\n+\n+describe WorkTypesController, type: :controller do\n+  let(:work_type) { create(:work_type) }\n+  let(:valid_attr) { attribtues_for(:work_type) }\n+\n+  let(:invalid_attributes) { skip('invalid for your model') }\n+\n+  before(:each) do\n+    allow_user_to :manage, WorkType\n+  end\n+\n+  describe \"GET #index\" do\n+    it \"assigns all work_types as @work_types\" do\n+      get :index, {}\n+\n+      expect(assigns(:work_types)).to eq([work_type])\n+    end\n+  end\n+\n+  describe \"GET #show\" do\n+    it \"assigns the requested work_type as @work_type\" do\n+      get :show, { id: work_type.to_param }\n+\n+      expect(assigns(:work_type)).to eq(work_type)\n+    end\n+  end\n+\n+  describe \"GET #new\" do\n+    it \"assigns a new work_type as @work_type\" do\n+      get :new, {}\n+      expect(assigns(:work_type)).to be_a_new(WorkType)\n+    end\n+  end\n+\n+  describe \"GET #edit\" do\n+    it \"assigns the requested work_type as @work_type\" do\n+      get :edit, { id: work_type.to_param }\n+      expect(assigns(:work_type)).to eq(work_type)\n+    end\n+  end\n+\n+  describe \"POST #create\" do\n+    context \"with valid params\" do\n+      it \"creates a new WorkType\" do\n+        expect {\n+          post :create, { work_type: valid_attributes }\n+        }.to change(WorkType, :count).by(1)\n+      end\n+\n+      it \"assigns a newly created work_type as @work_type\" do\n+        post :create, { work_type: valid_attributes }\n+        expect(assigns(:work_type)).to be_a(WorkType)\n+        expect(assigns(:work_type)).to be_persisted\n+      end\n+\n+      it \"redirects to the created work_type\" do\n+        post :create, { work_type: valid_attributes }\n+        expect(response).to redirect_to(WorkType.last)\n+      end\n+    end\n+\n+    context \"with invalid params\" do\n+      it \"assigns a newly created but unsaved work_type as @work_type\" do\n+        post :create, { work_type: invalid_attributes }\n+        expect(assigns(:work_type)).to be_a_new(WorkType)\n+      end\n+\n+      it \"re-renders the 'new' template\" do\n+        post :create, { work_type: invalid_attributes }\n+        expect(response).to render_template(\"new\")\n+      end\n+    end\n+  end\n+\n+  describe 'PUT #update' do\n+    context 'with valid params' do\n+      let(:new_attributes) {\n+        skip('Add a hash of attributes valid for your model')\n+            }\n+\n+      it 'updates the requested work_type' do\n+        put :update, { id: work_type.to_param , work_type: new_attributes }\n+        work_type.reload\n+        skip('Add assertions for updated state')","path":"spec/controllers/work_types_controller_spec.rb","position":85,"original_position":85,"commit_id":"4cb8c8b1b868b8379eb79b0e826765fac32e9994","original_commit_id":"4cb8c8b1b868b8379eb79b0e826765fac32e9994","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":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-06-14T15:44:26Z","updated_at":"2015-06-14T15:44:26Z","html_url":"https://github.com/davidwessman/workshop/pull/1#discussion_r32380913","pull_request_url":"https://api.github.com/repos/davidwessman/workshop/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/davidwessman/workshop/pulls/comments/32380913"},"html":{"href":"https://github.com/davidwessman/workshop/pull/1#discussion_r32380913"},"pull_request":{"href":"https://api.github.com/repos/davidwessman/workshop/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/davidwessman/workshop/pulls/1","id":32615794,"html_url":"https://github.com/davidwessman/workshop/pull/1","diff_url":"https://github.com/davidwessman/workshop/pull/1.diff","patch_url":"https://github.com/davidwessman/workshop/pull/1.patch","issue_url":"https://api.github.com/repos/davidwessman/workshop/issues/1","number":1,"state":"open","locked":false,"title":"Implements more views","user":{"login":"davidwessman","id":6763624,"avatar_url":"https://avatars.githubusercontent.com/u/6763624?v=3","gravatar_id":"","url":"https://api.github.com/users/davidwessman","html_url":"https://github.com/davidwessman","followers_url":"https://api.github.com/users/davidwessman/followers","following_url":"https://api.github.com/users/davidwessman/following{/other_user}","gists_url":"https://api.github.com/users/davidwessman/gists{/gist_id}","starred_url":"https://api.github.com/users/davidwessman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidwessman/subscriptions","organizations_url":"https://api.github.com/users/davidwessman/orgs","repos_url":"https://api.github.com/users/davidwessman/repos","events_url":"https://api.github.com/users/davidwessman/events{/privacy}","received_events_url":"https://api.github.com/users/davidwessman/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-03T20:53:22Z","updated_at":"2015-06-14T15:44:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb8676039f9b9dc26f0bf29d4bfa08a7acfbe12b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/davidwessman/workshop/pulls/1/commits","review_comments_url":"https://api.github.com/repos/davidwessman/workshop/pulls/1/comments","review_comment_url":"https://api.github.com/repos/davidwessman/workshop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/davidwessman/workshop/issues/1/comments","statuses_url":"https://api.github.com/repos/davidwessman/workshop/statuses/4cb8c8b1b868b8379eb79b0e826765fac32e9994","head":{"label":"davidwessman:dev","ref":"dev","sha":"4cb8c8b1b868b8379eb79b0e826765fac32e9994","user":{"login":"davidwessman","id":6763624,"avatar_url":"https://avatars.githubusercontent.com/u/6763624?v=3","gravatar_id":"","url":"https://api.github.com/users/davidwessman","html_url":"https://github.com/davidwessman","followers_url":"https://api.github.com/users/davidwessman/followers","following_url":"https://api.github.com/users/davidwessman/following{/other_user}","gists_url":"https://api.github.com/users/davidwessman/gists{/gist_id}","starred_url":"https://api.github.com/users/davidwessman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidwessman/subscriptions","organizations_url":"https://api.github.com/users/davidwessman/orgs","repos_url":"https://api.github.com/users/davidwessman/repos","events_url":"https://api.github.com/users/davidwessman/events{/privacy}","received_events_url":"https://api.github.com/users/davidwessman/received_events","type":"User","site_admin":false},"repo":{"id":31504458,"name":"workshop","full_name":"davidwessman/workshop","owner":{"login":"davidwessman","id":6763624,"avatar_url":"https://avatars.githubusercontent.com/u/6763624?v=3","gravatar_id":"","url":"https://api.github.com/users/davidwessman","html_url":"https://github.com/davidwessman","followers_url":"https://api.github.com/users/davidwessman/followers","following_url":"https://api.github.com/users/davidwessman/following{/other_user}","gists_url":"https://api.github.com/users/davidwessman/gists{/gist_id}","starred_url":"https://api.github.com/users/davidwessman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidwessman/subscriptions","organizations_url":"https://api.github.com/users/davidwessman/orgs","repos_url":"https://api.github.com/users/davidwessman/repos","events_url":"https://api.github.com/users/davidwessman/events{/privacy}","received_events_url":"https://api.github.com/users/davidwessman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidwessman/workshop","description":null,"fork":false,"url":"https://api.github.com/repos/davidwessman/workshop","forks_url":"https://api.github.com/repos/davidwessman/workshop/forks","keys_url":"https://api.github.com/repos/davidwessman/workshop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidwessman/workshop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidwessman/workshop/teams","hooks_url":"https://api.github.com/repos/davidwessman/workshop/hooks","issue_events_url":"https://api.github.com/repos/davidwessman/workshop/issues/events{/number}","events_url":"https://api.github.com/repos/davidwessman/workshop/events","assignees_url":"https://api.github.com/repos/davidwessman/workshop/assignees{/user}","branches_url":"https://api.github.com/repos/davidwessman/workshop/branches{/branch}","tags_url":"https://api.github.com/repos/davidwessman/workshop/tags","blobs_url":"https://api.github.com/repos/davidwessman/workshop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidwessman/workshop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidwessman/workshop/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidwessman/workshop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidwessman/workshop/statuses/{sha}","languages_url":"https://api.github.com/repos/davidwessman/workshop/languages","stargazers_url":"https://api.github.com/repos/davidwessman/workshop/stargazers","contributors_url":"https://api.github.com/repos/davidwessman/workshop/contributors","subscribers_url":"https://api.github.com/repos/davidwessman/workshop/subscribers","subscription_url":"https://api.github.com/repos/davidwessman/workshop/subscription","commits_url":"https://api.github.com/repos/davidwessman/workshop/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidwessman/workshop/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidwessman/workshop/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidwessman/workshop/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidwessman/workshop/contents/{+path}","compare_url":"https://api.github.com/repos/davidwessman/workshop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidwessman/workshop/merges","archive_url":"https://api.github.com/repos/davidwessman/workshop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidwessman/workshop/downloads","issues_url":"https://api.github.com/repos/davidwessman/workshop/issues{/number}","pulls_url":"https://api.github.com/repos/davidwessman/workshop/pulls{/number}","milestones_url":"https://api.github.com/repos/davidwessman/workshop/milestones{/number}","notifications_url":"https://api.github.com/repos/davidwessman/workshop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidwessman/workshop/labels{/name}","releases_url":"https://api.github.com/repos/davidwessman/workshop/releases{/id}","created_at":"2015-03-01T17:41:50Z","updated_at":"2015-04-03T18:34:42Z","pushed_at":"2015-06-14T15:44:16Z","git_url":"git://github.com/davidwessman/workshop.git","ssh_url":"git@github.com:davidwessman/workshop.git","clone_url":"https://github.com/davidwessman/workshop.git","svn_url":"https://github.com/davidwessman/workshop","homepage":"https://github.com","size":712,"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":"davidwessman:master","ref":"master","sha":"6d3aec95e0c0e3313f2b3bb2ce2d939c97b9cfdf","user":{"login":"davidwessman","id":6763624,"avatar_url":"https://avatars.githubusercontent.com/u/6763624?v=3","gravatar_id":"","url":"https://api.github.com/users/davidwessman","html_url":"https://github.com/davidwessman","followers_url":"https://api.github.com/users/davidwessman/followers","following_url":"https://api.github.com/users/davidwessman/following{/other_user}","gists_url":"https://api.github.com/users/davidwessman/gists{/gist_id}","starred_url":"https://api.github.com/users/davidwessman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidwessman/subscriptions","organizations_url":"https://api.github.com/users/davidwessman/orgs","repos_url":"https://api.github.com/users/davidwessman/repos","events_url":"https://api.github.com/users/davidwessman/events{/privacy}","received_events_url":"https://api.github.com/users/davidwessman/received_events","type":"User","site_admin":false},"repo":{"id":31504458,"name":"workshop","full_name":"davidwessman/workshop","owner":{"login":"davidwessman","id":6763624,"avatar_url":"https://avatars.githubusercontent.com/u/6763624?v=3","gravatar_id":"","url":"https://api.github.com/users/davidwessman","html_url":"https://github.com/davidwessman","followers_url":"https://api.github.com/users/davidwessman/followers","following_url":"https://api.github.com/users/davidwessman/following{/other_user}","gists_url":"https://api.github.com/users/davidwessman/gists{/gist_id}","starred_url":"https://api.github.com/users/davidwessman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidwessman/subscriptions","organizations_url":"https://api.github.com/users/davidwessman/orgs","repos_url":"https://api.github.com/users/davidwessman/repos","events_url":"https://api.github.com/users/davidwessman/events{/privacy}","received_events_url":"https://api.github.com/users/davidwessman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidwessman/workshop","description":null,"fork":false,"url":"https://api.github.com/repos/davidwessman/workshop","forks_url":"https://api.github.com/repos/davidwessman/workshop/forks","keys_url":"https://api.github.com/repos/davidwessman/workshop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidwessman/workshop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidwessman/workshop/teams","hooks_url":"https://api.github.com/repos/davidwessman/workshop/hooks","issue_events_url":"https://api.github.com/repos/davidwessman/workshop/issues/events{/number}","events_url":"https://api.github.com/repos/davidwessman/workshop/events","assignees_url":"https://api.github.com/repos/davidwessman/workshop/assignees{/user}","branches_url":"https://api.github.com/repos/davidwessman/workshop/branches{/branch}","tags_url":"https://api.github.com/repos/davidwessman/workshop/tags","blobs_url":"https://api.github.com/repos/davidwessman/workshop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidwessman/workshop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidwessman/workshop/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidwessman/workshop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidwessman/workshop/statuses/{sha}","languages_url":"https://api.github.com/repos/davidwessman/workshop/languages","stargazers_url":"https://api.github.com/repos/davidwessman/workshop/stargazers","contributors_url":"https://api.github.com/repos/davidwessman/workshop/contributors","subscribers_url":"https://api.github.com/repos/davidwessman/workshop/subscribers","subscription_url":"https://api.github.com/repos/davidwessman/workshop/subscription","commits_url":"https://api.github.com/repos/davidwessman/workshop/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidwessman/workshop/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidwessman/workshop/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidwessman/workshop/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidwessman/workshop/contents/{+path}","compare_url":"https://api.github.com/repos/davidwessman/workshop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidwessman/workshop/merges","archive_url":"https://api.github.com/repos/davidwessman/workshop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidwessman/workshop/downloads","issues_url":"https://api.github.com/repos/davidwessman/workshop/issues{/number}","pulls_url":"https://api.github.com/repos/davidwessman/workshop/pulls{/number}","milestones_url":"https://api.github.com/repos/davidwessman/workshop/milestones{/number}","notifications_url":"https://api.github.com/repos/davidwessman/workshop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidwessman/workshop/labels{/name}","releases_url":"https://api.github.com/repos/davidwessman/workshop/releases{/id}","created_at":"2015-03-01T17:41:50Z","updated_at":"2015-04-03T18:34:42Z","pushed_at":"2015-06-14T15:44:16Z","git_url":"git://github.com/davidwessman/workshop.git","ssh_url":"git@github.com:davidwessman/workshop.git","clone_url":"https://github.com/davidwessman/workshop.git","svn_url":"https://github.com/davidwessman/workshop","homepage":"https://github.com","size":712,"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/davidwessman/workshop/pulls/1"},"html":{"href":"https://github.com/davidwessman/workshop/pull/1"},"issue":{"href":"https://api.github.com/repos/davidwessman/workshop/issues/1"},"comments":{"href":"https://api.github.com/repos/davidwessman/workshop/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/davidwessman/workshop/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/davidwessman/workshop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/davidwessman/workshop/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/davidwessman/workshop/statuses/4cb8c8b1b868b8379eb79b0e826765fac32e9994"}}}}