count(20)->create(); $id_array = $assets->pluck('id')->toArray(); $this->actingAs(User::factory()->viewAssets()->create())->post('/hardware/bulkedit', [ 'ids' => $id_array, 'bulk_actions' => 'labels', ])->assertStatus(200); } public function testRedirectOfNoAssetsSelected() { $id_array = []; $this->actingAs(User::factory()->viewAssets()->create()) ->from(route('hardware.index')) ->post('/hardware/bulkedit', [ 'ids' => $id_array, 'bulk_actions' => 'Labels', ])->assertStatus(302) ->assertRedirect(route('hardware.index')); } }