{"action":"created","comment":{"url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/pulls/comments/82509024","pull_request_review_id":3414046,"id":82509024,"diff_hunk":"@@ -0,0 +1,19 @@\n+defmodule CascalhoScrumBoard.AddUserToTeamTest do\n+  use CascalhoScrumBoard.ModelCase\n+\n+  alias Ecto.Changeset\n+  alias CascalhoScrumBoard.User\n+  alias CascalhoScrumBoard.Team\n+\n+  test \"add user to team\" do\n+    user = %User{email: \"taiconery@gmail.com\", first_name: \"Tacio\", last_name: \"Nery\", password: \"1234567890\"}\n+            |> Repo.insert! |> Repo.preload(:teams)\n+\n+    team = %Team{name: \"Team One\", slug: \"teamone\"} |> Repo.insert! |> Repo.preload(:users)\n+\n+    changeset = Changeset.change(user) |> Changeset.put_assoc(:teams, [team])","path":"test/features/add_user_to_team_test.exs","position":14,"original_position":14,"commit_id":"f9998faa945f74eb23bff9d32c95d4142e65ba5d","original_commit_id":"f9998faa945f74eb23bff9d32c95d4142e65ba5d","user":{"login":"luizpaulogodoy","id":6953893,"avatar_url":"https://avatars.githubusercontent.com/u/6953893?v=3","gravatar_id":"","url":"https://api.github.com/users/luizpaulogodoy","html_url":"https://github.com/luizpaulogodoy","followers_url":"https://api.github.com/users/luizpaulogodoy/followers","following_url":"https://api.github.com/users/luizpaulogodoy/following{/other_user}","gists_url":"https://api.github.com/users/luizpaulogodoy/gists{/gist_id}","starred_url":"https://api.github.com/users/luizpaulogodoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luizpaulogodoy/subscriptions","organizations_url":"https://api.github.com/users/luizpaulogodoy/orgs","repos_url":"https://api.github.com/users/luizpaulogodoy/repos","events_url":"https://api.github.com/users/luizpaulogodoy/events{/privacy}","received_events_url":"https://api.github.com/users/luizpaulogodoy/received_events","type":"User","site_admin":false},"body":"changeset = Changeset.change(user) |> Changeset.put_assoc(:teams, [team]) |> Repo.update!(changeset)\r\n\r\nassert Repo.all(from d in UsersTeams, where: d.user_id == ^user.id AND from t in UsersTeams, where: t. team_id == ^team.id) != []","created_at":"2016-10-08T20:14:15Z","updated_at":"2016-10-08T20:14:29Z","html_url":"https://github.com/luizpaulogodoy/cascalho_scrum_board/pull/2#discussion_r82509024","pull_request_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/pulls/comments/82509024"},"html":{"href":"https://github.com/luizpaulogodoy/cascalho_scrum_board/pull/2#discussion_r82509024"},"pull_request":{"href":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/pulls/2","id":88555261,"html_url":"https://github.com/luizpaulogodoy/cascalho_scrum_board/pull/2","diff_url":"https://github.com/luizpaulogodoy/cascalho_scrum_board/pull/2.diff","patch_url":"https://github.com/luizpaulogodoy/cascalho_scrum_board/pull/2.patch","issue_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/issues/2","number":2,"state":"open","locked":false,"title":"WIP: add many to many relationship between users and teams","user":{"login":"thnery","id":22283932,"avatar_url":"https://avatars.githubusercontent.com/u/22283932?v=3","gravatar_id":"","url":"https://api.github.com/users/thnery","html_url":"https://github.com/thnery","followers_url":"https://api.github.com/users/thnery/followers","following_url":"https://api.github.com/users/thnery/following{/other_user}","gists_url":"https://api.github.com/users/thnery/gists{/gist_id}","starred_url":"https://api.github.com/users/thnery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thnery/subscriptions","organizations_url":"https://api.github.com/users/thnery/orgs","repos_url":"https://api.github.com/users/thnery/repos","events_url":"https://api.github.com/users/thnery/events{/privacy}","received_events_url":"https://api.github.com/users/thnery/received_events","type":"User","site_admin":false},"body":"@luizpaulogodoy do not aproove yet, we need to learn how to test this relation, check the `test/features/add_user_to_team_test.exs`","created_at":"2016-10-08T18:50:50Z","updated_at":"2016-10-08T20:14:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6064c9de8ce00052622a26cac1045b2190c6173","assignee":{"login":"luizpaulogodoy","id":6953893,"avatar_url":"https://avatars.githubusercontent.com/u/6953893?v=3","gravatar_id":"","url":"https://api.github.com/users/luizpaulogodoy","html_url":"https://github.com/luizpaulogodoy","followers_url":"https://api.github.com/users/luizpaulogodoy/followers","following_url":"https://api.github.com/users/luizpaulogodoy/following{/other_user}","gists_url":"https://api.github.com/users/luizpaulogodoy/gists{/gist_id}","starred_url":"https://api.github.com/users/luizpaulogodoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luizpaulogodoy/subscriptions","organizations_url":"https://api.github.com/users/luizpaulogodoy/orgs","repos_url":"https://api.github.com/users/luizpaulogodoy/repos","events_url":"https://api.github.com/users/luizpaulogodoy/events{/privacy}","received_events_url":"https://api.github.com/users/luizpaulogodoy/received_events","type":"User","site_admin":false},"assignees":[{"login":"luizpaulogodoy","id":6953893,"avatar_url":"https://avatars.githubusercontent.com/u/6953893?v=3","gravatar_id":"","url":"https://api.github.com/users/luizpaulogodoy","html_url":"https://github.com/luizpaulogodoy","followers_url":"https://api.github.com/users/luizpaulogodoy/followers","following_url":"https://api.github.com/users/luizpaulogodoy/following{/other_user}","gists_url":"https://api.github.com/users/luizpaulogodoy/gists{/gist_id}","starred_url":"https://api.github.com/users/luizpaulogodoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luizpaulogodoy/subscriptions","organizations_url":"https://api.github.com/users/luizpaulogodoy/orgs","repos_url":"https://api.github.com/users/luizpaulogodoy/repos","events_url":"https://api.github.com/users/luizpaulogodoy/events{/privacy}","received_events_url":"https://api.github.com/users/luizpaulogodoy/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/pulls/2/commits","review_comments_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/pulls/2/comments","review_comment_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/pulls/comments{/number}","comments_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/issues/2/comments","statuses_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/statuses/f9998faa945f74eb23bff9d32c95d4142e65ba5d","head":{"label":"luizpaulogodoy:feature/add-users-to-teams","ref":"feature/add-users-to-teams","sha":"f9998faa945f74eb23bff9d32c95d4142e65ba5d","user":{"login":"luizpaulogodoy","id":6953893,"avatar_url":"https://avatars.githubusercontent.com/u/6953893?v=3","gravatar_id":"","url":"https://api.github.com/users/luizpaulogodoy","html_url":"https://github.com/luizpaulogodoy","followers_url":"https://api.github.com/users/luizpaulogodoy/followers","following_url":"https://api.github.com/users/luizpaulogodoy/following{/other_user}","gists_url":"https://api.github.com/users/luizpaulogodoy/gists{/gist_id}","starred_url":"https://api.github.com/users/luizpaulogodoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luizpaulogodoy/subscriptions","organizations_url":"https://api.github.com/users/luizpaulogodoy/orgs","repos_url":"https://api.github.com/users/luizpaulogodoy/repos","events_url":"https://api.github.com/users/luizpaulogodoy/events{/privacy}","received_events_url":"https://api.github.com/users/luizpaulogodoy/received_events","type":"User","site_admin":false},"repo":{"id":69362827,"name":"cascalho_scrum_board","full_name":"luizpaulogodoy/cascalho_scrum_board","owner":{"login":"luizpaulogodoy","id":6953893,"avatar_url":"https://avatars.githubusercontent.com/u/6953893?v=3","gravatar_id":"","url":"https://api.github.com/users/luizpaulogodoy","html_url":"https://github.com/luizpaulogodoy","followers_url":"https://api.github.com/users/luizpaulogodoy/followers","following_url":"https://api.github.com/users/luizpaulogodoy/following{/other_user}","gists_url":"https://api.github.com/users/luizpaulogodoy/gists{/gist_id}","starred_url":"https://api.github.com/users/luizpaulogodoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luizpaulogodoy/subscriptions","organizations_url":"https://api.github.com/users/luizpaulogodoy/orgs","repos_url":"https://api.github.com/users/luizpaulogodoy/repos","events_url":"https://api.github.com/users/luizpaulogodoy/events{/privacy}","received_events_url":"https://api.github.com/users/luizpaulogodoy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/luizpaulogodoy/cascalho_scrum_board","description":"Cascalho Scrum Board","fork":false,"url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board","forks_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/forks","keys_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/keys{/key_id}","collaborators_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/teams","hooks_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/hooks","issue_events_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/issues/events{/number}","events_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/events","assignees_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/assignees{/user}","branches_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/branches{/branch}","tags_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/tags","blobs_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/git/refs{/sha}","trees_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/git/trees{/sha}","statuses_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/statuses/{sha}","languages_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/languages","stargazers_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/stargazers","contributors_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/contributors","subscribers_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/subscribers","subscription_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/subscription","commits_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/commits{/sha}","git_commits_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/git/commits{/sha}","comments_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/comments{/number}","issue_comment_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/issues/comments{/number}","contents_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/contents/{+path}","compare_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/compare/{base}...{head}","merges_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/merges","archive_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/downloads","issues_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/issues{/number}","pulls_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/pulls{/number}","milestones_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/milestones{/number}","notifications_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/labels{/name}","releases_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/releases{/id}","deployments_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/deployments","created_at":"2016-09-27T14:01:20Z","updated_at":"2016-09-27T16:40:35Z","pushed_at":"2016-10-08T18:50:51Z","git_url":"git://github.com/luizpaulogodoy/cascalho_scrum_board.git","ssh_url":"git@github.com:luizpaulogodoy/cascalho_scrum_board.git","clone_url":"https://github.com/luizpaulogodoy/cascalho_scrum_board.git","svn_url":"https://github.com/luizpaulogodoy/cascalho_scrum_board","homepage":null,"size":75,"stargazers_count":1,"watchers_count":1,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"luizpaulogodoy:develop","ref":"develop","sha":"436267cbdb8aac553506fea0627babbb9ee36785","user":{"login":"luizpaulogodoy","id":6953893,"avatar_url":"https://avatars.githubusercontent.com/u/6953893?v=3","gravatar_id":"","url":"https://api.github.com/users/luizpaulogodoy","html_url":"https://github.com/luizpaulogodoy","followers_url":"https://api.github.com/users/luizpaulogodoy/followers","following_url":"https://api.github.com/users/luizpaulogodoy/following{/other_user}","gists_url":"https://api.github.com/users/luizpaulogodoy/gists{/gist_id}","starred_url":"https://api.github.com/users/luizpaulogodoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luizpaulogodoy/subscriptions","organizations_url":"https://api.github.com/users/luizpaulogodoy/orgs","repos_url":"https://api.github.com/users/luizpaulogodoy/repos","events_url":"https://api.github.com/users/luizpaulogodoy/events{/privacy}","received_events_url":"https://api.github.com/users/luizpaulogodoy/received_events","type":"User","site_admin":false},"repo":{"id":69362827,"name":"cascalho_scrum_board","full_name":"luizpaulogodoy/cascalho_scrum_board","owner":{"login":"luizpaulogodoy","id":6953893,"avatar_url":"https://avatars.githubusercontent.com/u/6953893?v=3","gravatar_id":"","url":"https://api.github.com/users/luizpaulogodoy","html_url":"https://github.com/luizpaulogodoy","followers_url":"https://api.github.com/users/luizpaulogodoy/followers","following_url":"https://api.github.com/users/luizpaulogodoy/following{/other_user}","gists_url":"https://api.github.com/users/luizpaulogodoy/gists{/gist_id}","starred_url":"https://api.github.com/users/luizpaulogodoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luizpaulogodoy/subscriptions","organizations_url":"https://api.github.com/users/luizpaulogodoy/orgs","repos_url":"https://api.github.com/users/luizpaulogodoy/repos","events_url":"https://api.github.com/users/luizpaulogodoy/events{/privacy}","received_events_url":"https://api.github.com/users/luizpaulogodoy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/luizpaulogodoy/cascalho_scrum_board","description":"Cascalho Scrum Board","fork":false,"url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board","forks_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/forks","keys_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/keys{/key_id}","collaborators_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/teams","hooks_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/hooks","issue_events_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/issues/events{/number}","events_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/events","assignees_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/assignees{/user}","branches_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/branches{/branch}","tags_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/tags","blobs_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/git/refs{/sha}","trees_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/git/trees{/sha}","statuses_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/statuses/{sha}","languages_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/languages","stargazers_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/stargazers","contributors_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/contributors","subscribers_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/subscribers","subscription_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/subscription","commits_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/commits{/sha}","git_commits_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/git/commits{/sha}","comments_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/comments{/number}","issue_comment_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/issues/comments{/number}","contents_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/contents/{+path}","compare_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/compare/{base}...{head}","merges_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/merges","archive_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/downloads","issues_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/issues{/number}","pulls_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/pulls{/number}","milestones_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/milestones{/number}","notifications_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/labels{/name}","releases_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/releases{/id}","deployments_url":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/deployments","created_at":"2016-09-27T14:01:20Z","updated_at":"2016-09-27T16:40:35Z","pushed_at":"2016-10-08T18:50:51Z","git_url":"git://github.com/luizpaulogodoy/cascalho_scrum_board.git","ssh_url":"git@github.com:luizpaulogodoy/cascalho_scrum_board.git","clone_url":"https://github.com/luizpaulogodoy/cascalho_scrum_board.git","svn_url":"https://github.com/luizpaulogodoy/cascalho_scrum_board","homepage":null,"size":75,"stargazers_count":1,"watchers_count":1,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/pulls/2"},"html":{"href":"https://github.com/luizpaulogodoy/cascalho_scrum_board/pull/2"},"issue":{"href":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/issues/2"},"comments":{"href":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/luizpaulogodoy/cascalho_scrum_board/statuses/f9998faa945f74eb23bff9d32c95d4142e65ba5d"}}}}
{"actor":{"display_login":"luizpaulogodoy"}}