{"action":"created","comment":{"url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/comments/23642539","id":23642539,"diff_hunk":"@@ -0,0 +1,106 @@\n+describe Api::V1::TagsController do\n+\n+  describe \"index\" do\n+\n+    it \"returns a json array of all tags\" do\n+      tag1 = create(:tag)\n+      tag2 = create(:tag)\n+\n+      get :index, format: :json\n+\n+      json_response = JsonResponse.new(response)\n+      expect(json_response.headers).to have_http_status(:ok)\n+      expect(json_response.last_tag_name).to eq(tag2.name)\n+    end\n+  end\n+\n+  describe \"show\" do\n+    it \"returns a tag\" do\n+      tag = create(:tag)\n+\n+      get :show, format: :json, id: tag.id\n+\n+      json_response = JsonResponse.new(response)\n+      expect(json_response.headers).to have_http_status(:ok)\n+      expect(json_response.tag_name).to eq(tag.name)\n+    end\n+  end\n+\n+  describe \"create\" do\n+    it \"creates a tag (with full parameters)\" do\n+      skill1 = create(:skill)\n+      skill2 = create(:skill)\n+      tag_attributes = attributes_for(:tag)\n+      tag_attributes[:skills] = [skill1.id, skill2.id]\n+\n+      post :create, format: :json, tag: tag_attributes\n+\n+      json_response = JsonResponse.new(response)\n+      expect(json_response.headers).to have_http_status(:created)\n+      expect(json_response.tag_name).to eq(tag_attributes[:name])\n+      expect(json_response.tag_skill_ids).to eq([skill1.id, skill2.id])\n+    end\n+\n+    it \"responds with error messages if a tag fails to create\" do\n+      post :create, format: :json, tag: { name: \"\" }\n+\n+      json_response = JsonResponse.new(response)\n+      expect(json_response.headers).to have_http_status(:unprocessable_entity)\n+      expect(json_response.tag_error_message).to eq([\"Name can't be blank\"])\n+    end\n+  end\n+\n+  describe \"show\" do\n+    it \"returns an individual tag\" do\n+      tag = create(:tag, name: \"show_tag\")\n+\n+      get :show, format: :json, id: tag.id\n+\n+      json_response = JsonResponse.new(response)\n+      expect(json_response.headers).to have_http_status(:ok)\n+      expect(json_response.tag_name).to eq(\"show_tag\")\n+    end\n+  end\n+\n+  describe \"update\" do\n+    it \"updates a tag\" do\n+      skill_1 = create(:skill, name: \"skill1\")\n+      skill_2 = create(:skill, name: \"skill2\")\n+      tag = create(:tag, name: \"before_updated_name\", skills: [skill_1, skill_2])","path":"spec/controllers/api/v1/tags_controller_spec.rb","position":69,"original_position":69,"commit_id":"aebff248100f87f035546e302e9b686b9544d9b3","original_commit_id":"aebff248100f87f035546e302e9b686b9544d9b3","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. [81/80]","created_at":"2015-01-27T21:02:55Z","updated_at":"2015-01-27T21:02:55Z","html_url":"https://github.com/turingschool-projects/skill-inventory-rails/pull/46#discussion_r23642539","pull_request_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/46","_links":{"self":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/comments/23642539"},"html":{"href":"https://github.com/turingschool-projects/skill-inventory-rails/pull/46#discussion_r23642539"},"pull_request":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/46"}}},"pull_request":{"url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/46","id":28130814,"html_url":"https://github.com/turingschool-projects/skill-inventory-rails/pull/46","diff_url":"https://github.com/turingschool-projects/skill-inventory-rails/pull/46.diff","patch_url":"https://github.com/turingschool-projects/skill-inventory-rails/pull/46.patch","issue_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues/46","number":46,"state":"open","locked":false,"title":"Tags","user":{"login":"kavitasa","id":1514862,"avatar_url":"https://avatars.githubusercontent.com/u/1514862?v=3","gravatar_id":"","url":"https://api.github.com/users/kavitasa","html_url":"https://github.com/kavitasa","followers_url":"https://api.github.com/users/kavitasa/followers","following_url":"https://api.github.com/users/kavitasa/following{/other_user}","gists_url":"https://api.github.com/users/kavitasa/gists{/gist_id}","starred_url":"https://api.github.com/users/kavitasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kavitasa/subscriptions","organizations_url":"https://api.github.com/users/kavitasa/orgs","repos_url":"https://api.github.com/users/kavitasa/repos","events_url":"https://api.github.com/users/kavitasa/events{/privacy}","received_events_url":"https://api.github.com/users/kavitasa/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-27T18:08:50Z","updated_at":"2015-01-27T21:02:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c02cece1dc0e9efc00c269a8b06f02f89cbe3065","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/46/commits","review_comments_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/46/comments","review_comment_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/comments/{number}","comments_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues/46/comments","statuses_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/statuses/aebff248100f87f035546e302e9b686b9544d9b3","head":{"label":"kavitasa:tags","ref":"tags","sha":"aebff248100f87f035546e302e9b686b9544d9b3","user":{"login":"kavitasa","id":1514862,"avatar_url":"https://avatars.githubusercontent.com/u/1514862?v=3","gravatar_id":"","url":"https://api.github.com/users/kavitasa","html_url":"https://github.com/kavitasa","followers_url":"https://api.github.com/users/kavitasa/followers","following_url":"https://api.github.com/users/kavitasa/following{/other_user}","gists_url":"https://api.github.com/users/kavitasa/gists{/gist_id}","starred_url":"https://api.github.com/users/kavitasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kavitasa/subscriptions","organizations_url":"https://api.github.com/users/kavitasa/orgs","repos_url":"https://api.github.com/users/kavitasa/repos","events_url":"https://api.github.com/users/kavitasa/events{/privacy}","received_events_url":"https://api.github.com/users/kavitasa/received_events","type":"User","site_admin":false},"repo":{"id":29209615,"name":"skill-inventory-rails","full_name":"kavitasa/skill-inventory-rails","owner":{"login":"kavitasa","id":1514862,"avatar_url":"https://avatars.githubusercontent.com/u/1514862?v=3","gravatar_id":"","url":"https://api.github.com/users/kavitasa","html_url":"https://github.com/kavitasa","followers_url":"https://api.github.com/users/kavitasa/followers","following_url":"https://api.github.com/users/kavitasa/following{/other_user}","gists_url":"https://api.github.com/users/kavitasa/gists{/gist_id}","starred_url":"https://api.github.com/users/kavitasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kavitasa/subscriptions","organizations_url":"https://api.github.com/users/kavitasa/orgs","repos_url":"https://api.github.com/users/kavitasa/repos","events_url":"https://api.github.com/users/kavitasa/events{/privacy}","received_events_url":"https://api.github.com/users/kavitasa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kavitasa/skill-inventory-rails","description":"","fork":true,"url":"https://api.github.com/repos/kavitasa/skill-inventory-rails","forks_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/forks","keys_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/teams","hooks_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/hooks","issue_events_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/issues/events{/number}","events_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/events","assignees_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/assignees{/user}","branches_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/branches{/branch}","tags_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/tags","blobs_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/languages","stargazers_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/stargazers","contributors_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/contributors","subscribers_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/subscribers","subscription_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/subscription","commits_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/issues/comments/{number}","contents_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/contents/{+path}","compare_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/merges","archive_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/downloads","issues_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/issues{/number}","pulls_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/labels{/name}","releases_url":"https://api.github.com/repos/kavitasa/skill-inventory-rails/releases{/id}","created_at":"2015-01-13T20:31:51Z","updated_at":"2015-01-13T21:55:25Z","pushed_at":"2015-01-27T21:02:46Z","git_url":"git://github.com/kavitasa/skill-inventory-rails.git","ssh_url":"git@github.com:kavitasa/skill-inventory-rails.git","clone_url":"https://github.com/kavitasa/skill-inventory-rails.git","svn_url":"https://github.com/kavitasa/skill-inventory-rails","homepage":null,"size":393,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"turingschool-projects:master","ref":"master","sha":"a29ec4222bf39093d99788db20c6df198c7f1f54","user":{"login":"turingschool-projects","id":10454571,"avatar_url":"https://avatars.githubusercontent.com/u/10454571?v=3","gravatar_id":"","url":"https://api.github.com/users/turingschool-projects","html_url":"https://github.com/turingschool-projects","followers_url":"https://api.github.com/users/turingschool-projects/followers","following_url":"https://api.github.com/users/turingschool-projects/following{/other_user}","gists_url":"https://api.github.com/users/turingschool-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/turingschool-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turingschool-projects/subscriptions","organizations_url":"https://api.github.com/users/turingschool-projects/orgs","repos_url":"https://api.github.com/users/turingschool-projects/repos","events_url":"https://api.github.com/users/turingschool-projects/events{/privacy}","received_events_url":"https://api.github.com/users/turingschool-projects/received_events","type":"Organization","site_admin":false},"repo":{"id":28992701,"name":"skill-inventory-rails","full_name":"turingschool-projects/skill-inventory-rails","owner":{"login":"turingschool-projects","id":10454571,"avatar_url":"https://avatars.githubusercontent.com/u/10454571?v=3","gravatar_id":"","url":"https://api.github.com/users/turingschool-projects","html_url":"https://github.com/turingschool-projects","followers_url":"https://api.github.com/users/turingschool-projects/followers","following_url":"https://api.github.com/users/turingschool-projects/following{/other_user}","gists_url":"https://api.github.com/users/turingschool-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/turingschool-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turingschool-projects/subscriptions","organizations_url":"https://api.github.com/users/turingschool-projects/orgs","repos_url":"https://api.github.com/users/turingschool-projects/repos","events_url":"https://api.github.com/users/turingschool-projects/events{/privacy}","received_events_url":"https://api.github.com/users/turingschool-projects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/turingschool-projects/skill-inventory-rails","description":"","fork":false,"url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails","forks_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/forks","keys_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/teams","hooks_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/hooks","issue_events_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues/events{/number}","events_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/events","assignees_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/assignees{/user}","branches_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/branches{/branch}","tags_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/tags","blobs_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/languages","stargazers_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/stargazers","contributors_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/contributors","subscribers_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/subscribers","subscription_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/subscription","commits_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues/comments/{number}","contents_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/contents/{+path}","compare_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/merges","archive_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/downloads","issues_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues{/number}","pulls_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/labels{/name}","releases_url":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/releases{/id}","created_at":"2015-01-09T00:13:32Z","updated_at":"2015-01-27T20:25:56Z","pushed_at":"2015-01-27T20:25:55Z","git_url":"git://github.com/turingschool-projects/skill-inventory-rails.git","ssh_url":"git@github.com:turingschool-projects/skill-inventory-rails.git","clone_url":"https://github.com/turingschool-projects/skill-inventory-rails.git","svn_url":"https://github.com/turingschool-projects/skill-inventory-rails","homepage":null,"size":748,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":19,"forks":4,"open_issues":19,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/46"},"html":{"href":"https://github.com/turingschool-projects/skill-inventory-rails/pull/46"},"issue":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues/46"},"comments":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/turingschool-projects/skill-inventory-rails/statuses/aebff248100f87f035546e302e9b686b9544d9b3"}}}}