File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
tests/Feature/GraphQL/Mutations Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,17 @@ class CreateProject
1616 public function __invoke (null $ _ , array $ args ): Project
1717 {
1818 Gate::authorize ('create ' , Project::class);
19- return ProjectService::create ($ args );
19+
20+ $ project = ProjectService::create ($ args );
21+
22+ $ project ->users ()->attach (auth ()->user ()?->id, [
23+ 'emailtype ' => 0 ,
24+ 'emailcategory ' => 62 ,
25+ 'emailsuccess ' => false ,
26+ 'emailmissingsites ' => false ,
27+ 'role ' => Project::PROJECT_ADMIN ,
28+ ]);
29+
30+ return $ project ;
2031 }
2132}
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ public function testCreateProjectUserCreateProject(): void
159159 ],
160160 ]);
161161
162- $ project ->delete ( );
162+ self :: assertContains ( $ this -> users [ ' normal ' ]-> id , $ project ->administrators ()-> pluck ( ' id ' )-> all () );
163163 }
164164
165165 public function testCreateProjectAdmin (): void
@@ -196,7 +196,7 @@ public function testCreateProjectAdmin(): void
196196 ],
197197 ]);
198198
199- $ project ->delete ( );
199+ self :: assertContains ( $ this -> users [ ' admin ' ]-> id , $ project ->administrators ()-> pluck ( ' id ' )-> all () );
200200 }
201201
202202 /**
You can’t perform that action at this time.
0 commit comments