@@ -27,21 +27,6 @@ defmodule CodeCorps.GitHub.Event.IssueCommentTest do
2727 describe "handle/1 for IssueComment::#{ action } " do
2828 @ payload load_event_fixture ( "issue_comment_#{ action } " )
2929
30- test "with unmatched both users, passes with no changes made if no matching projects" do
31- % {
32- "issue" => % { "user" => % { "id" => issue_user_github_id } } ,
33- "comment" => % { "user" => % { "id" => comment_user_github_id } } ,
34- "repository" => % { "id" => repo_github_id }
35- } = @ payload
36-
37- insert ( :github_repo , github_id: repo_github_id )
38- assert IssueComment . handle ( @ payload ) == { :ok , [ ] }
39- assert Repo . aggregate ( Task , :count , :id ) == 0
40- assert Repo . aggregate ( Comment , :count , :id ) == 0
41- refute Repo . get_by ( User , github_id: issue_user_github_id )
42- refute Repo . get_by ( User , github_id: comment_user_github_id )
43- end
44-
4530 test "with unmatched both users, creates users, creates missing tasks, missing comments, for all projects connected with the github repo" do
4631 % {
4732 "issue" => % {
@@ -102,21 +87,6 @@ defmodule CodeCorps.GitHub.Event.IssueCommentTest do
10287 refute Repo . one ( User )
10388 end
10489
105- test "with matched issue user, unmatched comment_user, passes with no changes made if no matching projects" do
106- % {
107- "issue" => % { "user" => % { "id" => issue_user_github_id } } ,
108- "comment" => % { "user" => % { "id" => comment_user_github_id } } ,
109- "repository" => % { "id" => repo_github_id }
110- } = @ payload
111-
112- insert ( :user , github_id: issue_user_github_id )
113- insert ( :github_repo , github_id: repo_github_id )
114- assert IssueComment . handle ( @ payload ) == { :ok , [ ] }
115- assert Repo . aggregate ( Task , :count , :id ) == 0
116- assert Repo . aggregate ( Comment , :count , :id ) == 0
117- refute Repo . get_by ( User , github_id: comment_user_github_id )
118- end
119-
12090 test "with matched issue user, unmatched comment user, creates and updates tasks, comments and comment user, for each related project" do
12191 % {
12292 "issue" => % {
@@ -191,21 +161,6 @@ defmodule CodeCorps.GitHub.Event.IssueCommentTest do
191161 assert IssueComment . handle ( @ payload ) == { :error , :repository_not_found }
192162 end
193163
194- test "with unmatched issue user, matched comment_user, passes with no changes made if no matching projects" do
195- % {
196- "issue" => % { "user" => % { "id" => issue_user_github_id } } ,
197- "comment" => % { "user" => % { "id" => comment_user_github_id } } ,
198- "repository" => % { "id" => repo_github_id }
199- } = @ payload
200-
201- insert ( :user , github_id: comment_user_github_id )
202- insert ( :github_repo , github_id: repo_github_id )
203- assert IssueComment . handle ( @ payload ) == { :ok , [ ] }
204- assert Repo . aggregate ( Task , :count , :id ) == 0
205- assert Repo . aggregate ( Comment , :count , :id ) == 0
206- refute Repo . get_by ( User , github_id: issue_user_github_id )
207- end
208-
209164 test "with unmatched issue user, matched comment user, creates and updates tasks, comments and issue user, for each related project" do
210165 % {
211166 "issue" => % {
@@ -269,21 +224,6 @@ defmodule CodeCorps.GitHub.Event.IssueCommentTest do
269224 assert IssueComment . handle ( @ payload ) == { :error , :repository_not_found }
270225 end
271226
272- test "with matched issue and comment_user, passes with no changes made if no matching projects" do
273- % {
274- "issue" => % { "user" => % { "id" => issue_user_github_id } } ,
275- "comment" => % { "user" => % { "id" => comment_user_github_id } } ,
276- "repository" => % { "id" => repo_github_id }
277- } = @ payload
278-
279- insert ( :user , github_id: comment_user_github_id )
280- insert ( :user , github_id: issue_user_github_id )
281- insert ( :github_repo , github_id: repo_github_id )
282- assert IssueComment . handle ( @ payload ) == { :ok , [ ] }
283- assert Repo . aggregate ( Task , :count , :id ) == 0
284- assert Repo . aggregate ( Comment , :count , :id ) == 0
285- end
286-
287227 test "with matched issue and comment user, creates and updates tasks, comments, for each related project" do
288228 % {
289229 "issue" => % {
0 commit comments