{"action":"created","comment":{"url":"https://api.github.com/repos/code-corps/code-corps-api/pulls/comments/86389632","pull_request_review_id":7051458,"id":86389632,"diff_hunk":"@@ -1,148 +1,88 @@\n defmodule CodeCorps.RoleSkillControllerTest do\n-  use CodeCorps.ApiCase\n-\n-  alias CodeCorps.RoleSkill\n-  alias CodeCorps.Repo\n-\n-  @valid_attrs %{}\n-  @invalid_attrs %{}\n-\n-  defp build_payload, do: %{ \"data\" => %{\"type\" => \"role-skill\", \"attributes\" => %{}}}\n+  use CodeCorps.ApiCase, resource_name: :role_skill\n \n   describe \"index\" do\n     test \"lists all entries on index\", %{conn: conn} do\n-      path = conn |> role_skill_path(:index)\n-      json = conn |> get(path) |> json_response(200)\n-      assert json[\"data\"] == []\n+      [role_skill_1, role_skill_2] = insert_pair(:role_skill)\n+\n+       conn\n+       |> request_index\n+       |> json_response(200)\n+       |> assert_ids_from_response([role_skill_1.id, role_skill_2.id])\n     end\n \n     test \"filters resources on index\", %{conn: conn} do\n-      elixir = insert(:skill, title: \"Elixir\")\n-      phoenix = insert(:skill, title: \"Phoenix\")\n-      rails = insert(:skill, title: \"Rails\")\n-\n-      role = insert(:role)\n-      role_skill_1 = insert(:role_skill, role: role, skill: elixir)\n-      role_skill_2 = insert(:role_skill, role: role, skill: phoenix)\n-      insert(:role_skill, role: role, skill: rails)\n+      [role_skill_1, role_skill_2] = insert_pair(:role_skill)","path":"test/controllers/role_skill_controller_test.exs","position":35,"original_position":35,"commit_id":"04271fa6bd3495814d5a360fe00f18f8de1ecb39","original_commit_id":"04271fa6bd3495814d5a360fe00f18f8de1ecb39","user":{"login":"begedin","id":1925540,"avatar_url":"https://avatars.githubusercontent.com/u/1925540?v=3","gravatar_id":"","url":"https://api.github.com/users/begedin","html_url":"https://github.com/begedin","followers_url":"https://api.github.com/users/begedin/followers","following_url":"https://api.github.com/users/begedin/following{/other_user}","gists_url":"https://api.github.com/users/begedin/gists{/gist_id}","starred_url":"https://api.github.com/users/begedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/begedin/subscriptions","organizations_url":"https://api.github.com/users/begedin/orgs","repos_url":"https://api.github.com/users/begedin/repos","events_url":"https://api.github.com/users/begedin/events{/privacy}","received_events_url":"https://api.github.com/users/begedin/received_events","type":"User","site_admin":false},"body":"You figured out the missing third record, so I'll just link https://github.com/code-corps/code-corps-api/pull/425/files#r86388037 as a pointer on how to write this in one line.","created_at":"2016-11-03T16:47:22Z","updated_at":"2016-11-03T16:47:22Z","html_url":"https://github.com/code-corps/code-corps-api/pull/416#discussion_r86389632","pull_request_url":"https://api.github.com/repos/code-corps/code-corps-api/pulls/416","_links":{"self":{"href":"https://api.github.com/repos/code-corps/code-corps-api/pulls/comments/86389632"},"html":{"href":"https://github.com/code-corps/code-corps-api/pull/416#discussion_r86389632"},"pull_request":{"href":"https://api.github.com/repos/code-corps/code-corps-api/pulls/416"}}},"pull_request":{"url":"https://api.github.com/repos/code-corps/code-corps-api/pulls/416","id":91883949,"html_url":"https://github.com/code-corps/code-corps-api/pull/416","diff_url":"https://github.com/code-corps/code-corps-api/pull/416.diff","patch_url":"https://github.com/code-corps/code-corps-api/pull/416.patch","issue_url":"https://api.github.com/repos/code-corps/code-corps-api/issues/416","number":416,"state":"open","locked":false,"title":"Refactor Role Skills Controller Tests","user":{"login":"amyschools","id":19355893,"avatar_url":"https://avatars.githubusercontent.com/u/19355893?v=3","gravatar_id":"","url":"https://api.github.com/users/amyschools","html_url":"https://github.com/amyschools","followers_url":"https://api.github.com/users/amyschools/followers","following_url":"https://api.github.com/users/amyschools/following{/other_user}","gists_url":"https://api.github.com/users/amyschools/gists{/gist_id}","starred_url":"https://api.github.com/users/amyschools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amyschools/subscriptions","organizations_url":"https://api.github.com/users/amyschools/orgs","repos_url":"https://api.github.com/users/amyschools/repos","events_url":"https://api.github.com/users/amyschools/events{/privacy}","received_events_url":"https://api.github.com/users/amyschools/received_events","type":"User","site_admin":false},"body":"# What's in this PR?\r\n\r\nAdding helpers from api_case.ex.\r\n\r\n## References\r\nFixes #414 \r\n\r\nProgress on: #413 \r\n\r\n","created_at":"2016-11-01T23:28:01Z","updated_at":"2016-11-03T16:47:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a07bf6ac3e8190d5679b84f93a54a03b2ac263b","assignee":{"login":"amyschools","id":19355893,"avatar_url":"https://avatars.githubusercontent.com/u/19355893?v=3","gravatar_id":"","url":"https://api.github.com/users/amyschools","html_url":"https://github.com/amyschools","followers_url":"https://api.github.com/users/amyschools/followers","following_url":"https://api.github.com/users/amyschools/following{/other_user}","gists_url":"https://api.github.com/users/amyschools/gists{/gist_id}","starred_url":"https://api.github.com/users/amyschools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amyschools/subscriptions","organizations_url":"https://api.github.com/users/amyschools/orgs","repos_url":"https://api.github.com/users/amyschools/repos","events_url":"https://api.github.com/users/amyschools/events{/privacy}","received_events_url":"https://api.github.com/users/amyschools/received_events","type":"User","site_admin":false},"assignees":[{"login":"amyschools","id":19355893,"avatar_url":"https://avatars.githubusercontent.com/u/19355893?v=3","gravatar_id":"","url":"https://api.github.com/users/amyschools","html_url":"https://github.com/amyschools","followers_url":"https://api.github.com/users/amyschools/followers","following_url":"https://api.github.com/users/amyschools/following{/other_user}","gists_url":"https://api.github.com/users/amyschools/gists{/gist_id}","starred_url":"https://api.github.com/users/amyschools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amyschools/subscriptions","organizations_url":"https://api.github.com/users/amyschools/orgs","repos_url":"https://api.github.com/users/amyschools/repos","events_url":"https://api.github.com/users/amyschools/events{/privacy}","received_events_url":"https://api.github.com/users/amyschools/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/code-corps/code-corps-api/pulls/416/commits","review_comments_url":"https://api.github.com/repos/code-corps/code-corps-api/pulls/416/comments","review_comment_url":"https://api.github.com/repos/code-corps/code-corps-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/code-corps/code-corps-api/issues/416/comments","statuses_url":"https://api.github.com/repos/code-corps/code-corps-api/statuses/04271fa6bd3495814d5a360fe00f18f8de1ecb39","head":{"label":"code-corps:414-roleskills-controller-test","ref":"414-roleskills-controller-test","sha":"04271fa6bd3495814d5a360fe00f18f8de1ecb39","user":{"login":"code-corps","id":12991115,"avatar_url":"https://avatars.githubusercontent.com/u/12991115?v=3","gravatar_id":"","url":"https://api.github.com/users/code-corps","html_url":"https://github.com/code-corps","followers_url":"https://api.github.com/users/code-corps/followers","following_url":"https://api.github.com/users/code-corps/following{/other_user}","gists_url":"https://api.github.com/users/code-corps/gists{/gist_id}","starred_url":"https://api.github.com/users/code-corps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-corps/subscriptions","organizations_url":"https://api.github.com/users/code-corps/orgs","repos_url":"https://api.github.com/users/code-corps/repos","events_url":"https://api.github.com/users/code-corps/events{/privacy}","received_events_url":"https://api.github.com/users/code-corps/received_events","type":"Organization","site_admin":false},"repo":{"id":63497734,"name":"code-corps-api","full_name":"code-corps/code-corps-api","owner":{"login":"code-corps","id":12991115,"avatar_url":"https://avatars.githubusercontent.com/u/12991115?v=3","gravatar_id":"","url":"https://api.github.com/users/code-corps","html_url":"https://github.com/code-corps","followers_url":"https://api.github.com/users/code-corps/followers","following_url":"https://api.github.com/users/code-corps/following{/other_user}","gists_url":"https://api.github.com/users/code-corps/gists{/gist_id}","starred_url":"https://api.github.com/users/code-corps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-corps/subscriptions","organizations_url":"https://api.github.com/users/code-corps/orgs","repos_url":"https://api.github.com/users/code-corps/repos","events_url":"https://api.github.com/users/code-corps/events{/privacy}","received_events_url":"https://api.github.com/users/code-corps/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-corps/code-corps-api","description":"Elixir/Phoenix API for Code Corps.","fork":false,"url":"https://api.github.com/repos/code-corps/code-corps-api","forks_url":"https://api.github.com/repos/code-corps/code-corps-api/forks","keys_url":"https://api.github.com/repos/code-corps/code-corps-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-corps/code-corps-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-corps/code-corps-api/teams","hooks_url":"https://api.github.com/repos/code-corps/code-corps-api/hooks","issue_events_url":"https://api.github.com/repos/code-corps/code-corps-api/issues/events{/number}","events_url":"https://api.github.com/repos/code-corps/code-corps-api/events","assignees_url":"https://api.github.com/repos/code-corps/code-corps-api/assignees{/user}","branches_url":"https://api.github.com/repos/code-corps/code-corps-api/branches{/branch}","tags_url":"https://api.github.com/repos/code-corps/code-corps-api/tags","blobs_url":"https://api.github.com/repos/code-corps/code-corps-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-corps/code-corps-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-corps/code-corps-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-corps/code-corps-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-corps/code-corps-api/statuses/{sha}","languages_url":"https://api.github.com/repos/code-corps/code-corps-api/languages","stargazers_url":"https://api.github.com/repos/code-corps/code-corps-api/stargazers","contributors_url":"https://api.github.com/repos/code-corps/code-corps-api/contributors","subscribers_url":"https://api.github.com/repos/code-corps/code-corps-api/subscribers","subscription_url":"https://api.github.com/repos/code-corps/code-corps-api/subscription","commits_url":"https://api.github.com/repos/code-corps/code-corps-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-corps/code-corps-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-corps/code-corps-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-corps/code-corps-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-corps/code-corps-api/contents/{+path}","compare_url":"https://api.github.com/repos/code-corps/code-corps-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-corps/code-corps-api/merges","archive_url":"https://api.github.com/repos/code-corps/code-corps-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-corps/code-corps-api/downloads","issues_url":"https://api.github.com/repos/code-corps/code-corps-api/issues{/number}","pulls_url":"https://api.github.com/repos/code-corps/code-corps-api/pulls{/number}","milestones_url":"https://api.github.com/repos/code-corps/code-corps-api/milestones{/number}","notifications_url":"https://api.github.com/repos/code-corps/code-corps-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-corps/code-corps-api/labels{/name}","releases_url":"https://api.github.com/repos/code-corps/code-corps-api/releases{/id}","deployments_url":"https://api.github.com/repos/code-corps/code-corps-api/deployments","created_at":"2016-07-16T18:49:25Z","updated_at":"2016-11-03T12:57:43Z","pushed_at":"2016-11-03T00:07:29Z","git_url":"git://github.com/code-corps/code-corps-api.git","ssh_url":"git@github.com:code-corps/code-corps-api.git","clone_url":"https://github.com/code-corps/code-corps-api.git","svn_url":"https://github.com/code-corps/code-corps-api","homepage":"https://www.codecorps.org","size":772,"stargazers_count":75,"watchers_count":75,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":74,"forks":20,"open_issues":74,"watchers":75,"default_branch":"develop"}},"base":{"label":"code-corps:develop","ref":"develop","sha":"af079d062e2a1ff67061a39a3c5add7aff28be29","user":{"login":"code-corps","id":12991115,"avatar_url":"https://avatars.githubusercontent.com/u/12991115?v=3","gravatar_id":"","url":"https://api.github.com/users/code-corps","html_url":"https://github.com/code-corps","followers_url":"https://api.github.com/users/code-corps/followers","following_url":"https://api.github.com/users/code-corps/following{/other_user}","gists_url":"https://api.github.com/users/code-corps/gists{/gist_id}","starred_url":"https://api.github.com/users/code-corps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-corps/subscriptions","organizations_url":"https://api.github.com/users/code-corps/orgs","repos_url":"https://api.github.com/users/code-corps/repos","events_url":"https://api.github.com/users/code-corps/events{/privacy}","received_events_url":"https://api.github.com/users/code-corps/received_events","type":"Organization","site_admin":false},"repo":{"id":63497734,"name":"code-corps-api","full_name":"code-corps/code-corps-api","owner":{"login":"code-corps","id":12991115,"avatar_url":"https://avatars.githubusercontent.com/u/12991115?v=3","gravatar_id":"","url":"https://api.github.com/users/code-corps","html_url":"https://github.com/code-corps","followers_url":"https://api.github.com/users/code-corps/followers","following_url":"https://api.github.com/users/code-corps/following{/other_user}","gists_url":"https://api.github.com/users/code-corps/gists{/gist_id}","starred_url":"https://api.github.com/users/code-corps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-corps/subscriptions","organizations_url":"https://api.github.com/users/code-corps/orgs","repos_url":"https://api.github.com/users/code-corps/repos","events_url":"https://api.github.com/users/code-corps/events{/privacy}","received_events_url":"https://api.github.com/users/code-corps/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-corps/code-corps-api","description":"Elixir/Phoenix API for Code Corps.","fork":false,"url":"https://api.github.com/repos/code-corps/code-corps-api","forks_url":"https://api.github.com/repos/code-corps/code-corps-api/forks","keys_url":"https://api.github.com/repos/code-corps/code-corps-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-corps/code-corps-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-corps/code-corps-api/teams","hooks_url":"https://api.github.com/repos/code-corps/code-corps-api/hooks","issue_events_url":"https://api.github.com/repos/code-corps/code-corps-api/issues/events{/number}","events_url":"https://api.github.com/repos/code-corps/code-corps-api/events","assignees_url":"https://api.github.com/repos/code-corps/code-corps-api/assignees{/user}","branches_url":"https://api.github.com/repos/code-corps/code-corps-api/branches{/branch}","tags_url":"https://api.github.com/repos/code-corps/code-corps-api/tags","blobs_url":"https://api.github.com/repos/code-corps/code-corps-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-corps/code-corps-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-corps/code-corps-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-corps/code-corps-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-corps/code-corps-api/statuses/{sha}","languages_url":"https://api.github.com/repos/code-corps/code-corps-api/languages","stargazers_url":"https://api.github.com/repos/code-corps/code-corps-api/stargazers","contributors_url":"https://api.github.com/repos/code-corps/code-corps-api/contributors","subscribers_url":"https://api.github.com/repos/code-corps/code-corps-api/subscribers","subscription_url":"https://api.github.com/repos/code-corps/code-corps-api/subscription","commits_url":"https://api.github.com/repos/code-corps/code-corps-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-corps/code-corps-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-corps/code-corps-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-corps/code-corps-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-corps/code-corps-api/contents/{+path}","compare_url":"https://api.github.com/repos/code-corps/code-corps-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-corps/code-corps-api/merges","archive_url":"https://api.github.com/repos/code-corps/code-corps-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-corps/code-corps-api/downloads","issues_url":"https://api.github.com/repos/code-corps/code-corps-api/issues{/number}","pulls_url":"https://api.github.com/repos/code-corps/code-corps-api/pulls{/number}","milestones_url":"https://api.github.com/repos/code-corps/code-corps-api/milestones{/number}","notifications_url":"https://api.github.com/repos/code-corps/code-corps-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-corps/code-corps-api/labels{/name}","releases_url":"https://api.github.com/repos/code-corps/code-corps-api/releases{/id}","deployments_url":"https://api.github.com/repos/code-corps/code-corps-api/deployments","created_at":"2016-07-16T18:49:25Z","updated_at":"2016-11-03T12:57:43Z","pushed_at":"2016-11-03T00:07:29Z","git_url":"git://github.com/code-corps/code-corps-api.git","ssh_url":"git@github.com:code-corps/code-corps-api.git","clone_url":"https://github.com/code-corps/code-corps-api.git","svn_url":"https://github.com/code-corps/code-corps-api","homepage":"https://www.codecorps.org","size":772,"stargazers_count":75,"watchers_count":75,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":74,"forks":20,"open_issues":74,"watchers":75,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/code-corps/code-corps-api/pulls/416"},"html":{"href":"https://github.com/code-corps/code-corps-api/pull/416"},"issue":{"href":"https://api.github.com/repos/code-corps/code-corps-api/issues/416"},"comments":{"href":"https://api.github.com/repos/code-corps/code-corps-api/issues/416/comments"},"review_comments":{"href":"https://api.github.com/repos/code-corps/code-corps-api/pulls/416/comments"},"review_comment":{"href":"https://api.github.com/repos/code-corps/code-corps-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/code-corps/code-corps-api/pulls/416/commits"},"statuses":{"href":"https://api.github.com/repos/code-corps/code-corps-api/statuses/04271fa6bd3495814d5a360fe00f18f8de1ecb39"}}}}
{"actor":{"display_login":"begedin"}}