From 677479157f57dee1d9d644e0bde603f49004de7b Mon Sep 17 00:00:00 2001 From: Artem Otliaguzov Date: Tue, 11 Jun 2024 10:01:31 +0200 Subject: [PATCH] remove delete job from federation --- app/Http/Controllers/FederationController.php | 3 +-- ...{GitUpdateFederation.php => Old_GitUpdateFederation.php} | 2 +- tests/Feature/Http/Controllers/FederationControllerTest.php | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) rename app/Jobs/{GitUpdateFederation.php => Old_GitUpdateFederation.php} (97%) diff --git a/app/Http/Controllers/FederationController.php b/app/Http/Controllers/FederationController.php index 825ffdb..6468319 100644 --- a/app/Http/Controllers/FederationController.php +++ b/app/Http/Controllers/FederationController.php @@ -6,7 +6,6 @@ use App\Http\Requests\UpdateFederation; use App\Jobs\GitAddMembers; use App\Jobs\GitDeleteMembers; -use App\Jobs\GitUpdateFederation; use App\Models\Entity; use App\Models\Federation; use App\Models\User; @@ -192,7 +191,7 @@ public function update(UpdateFederation $request, Federation $federation) ->route('federations.show', $federation); } - GitUpdateFederation::dispatch($federation, Auth::user()); + // GitUpdateFederation::dispatch($federation, Auth::user()); Notification::send($federation->operators, new FederationUpdated($federation)); Notification::send(User::activeAdmins()->select('id', 'email')->get(), new FederationUpdated($federation)); diff --git a/app/Jobs/GitUpdateFederation.php b/app/Jobs/Old_GitUpdateFederation.php similarity index 97% rename from app/Jobs/GitUpdateFederation.php rename to app/Jobs/Old_GitUpdateFederation.php index 361bfc7..84ad3df 100644 --- a/app/Jobs/GitUpdateFederation.php +++ b/app/Jobs/Old_GitUpdateFederation.php @@ -16,7 +16,7 @@ use Illuminate\Support\Facades\Storage; use Throwable; -class GitUpdateFederation implements ShouldQueue +class Old_GitUpdateFederation implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels, GitTrait; diff --git a/tests/Feature/Http/Controllers/FederationControllerTest.php b/tests/Feature/Http/Controllers/FederationControllerTest.php index 4eabd57..bec4c36 100644 --- a/tests/Feature/Http/Controllers/FederationControllerTest.php +++ b/tests/Feature/Http/Controllers/FederationControllerTest.php @@ -392,9 +392,9 @@ public function a_user_with_operator_permission_can_edit_an_existing_federation( $federation->refresh(); $this->assertEquals($federationName, $federation->name); - Bus::assertDispatched(GitUpdateFederation::class, function ($job) use ($federation) { +/* Bus::assertDispatched(GitUpdateFederation::class, function ($job) use ($federation) { return $job->federation->is($federation); - }); + });*/ } /** @test */ @@ -606,7 +606,7 @@ public function a_user_without_operator_permission_cannot_edit_an_existing_feder $this->assertEquals(route('federations.show', $federation), url()->current()); - Bus::assertNotDispatched(GitUpdateFederation::class); +// Bus::assertNotDispatched(GitUpdateFederation::class); } /** @test */