Skip to content

Commit

Permalink
remove delete job from federation
Browse files Browse the repository at this point in the history
  • Loading branch information
temaotl committed Jun 11, 2024
1 parent 62659fa commit 6774791
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions app/Http/Controllers/FederationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions tests/Feature/Http/Controllers/FederationControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 6774791

Please sign in to comment.