display also nami activities
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
d776a66836
commit
241b46da53
|
@ -17,7 +17,7 @@ class IndexAction
|
|||
|
||||
public function handle(ActivityFilterScope $filter): AnonymousResourceCollection
|
||||
{
|
||||
return ActivityResource::collection(Activity::local()->withFilter($filter)->paginate(20));
|
||||
return ActivityResource::collection(Activity::withFilter($filter)->paginate(20));
|
||||
}
|
||||
|
||||
public function asController(ActionRequest $request): Response
|
||||
|
@ -30,7 +30,7 @@ class IndexAction
|
|||
'data' => $this->handle($filter),
|
||||
'toolbar' => [
|
||||
['href' => route('activity.create'), 'label' => 'Tätigkeit erstellen', 'color' => 'primary', 'icon' => 'plus'],
|
||||
]
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ class IndexTest extends TestCase
|
|||
{
|
||||
use DatabaseTransactions;
|
||||
|
||||
public function testItDisplaysLocalActivities(): void
|
||||
public function testItDisplaysActivities(): void
|
||||
{
|
||||
$this->login()->loginNami()->withoutExceptionHandling();
|
||||
$first = Activity::factory()->name('Local')->create();
|
||||
|
@ -22,7 +22,7 @@ class IndexTest extends TestCase
|
|||
$this->assertInertiaHas('Local', $response, 'data.data.0.name');
|
||||
$this->assertInertiaHas(route('activity.update', ['activity' => $first]), $response, 'data.data.0.links.update');
|
||||
$this->assertInertiaHas(route('activity.destroy', ['activity' => $first]), $response, 'data.data.0.links.destroy');
|
||||
$this->assertCount(1, $this->inertia($response, 'data.data'));
|
||||
$this->assertCount(2, $this->inertia($response, 'data.data'));
|
||||
}
|
||||
|
||||
public function testItDisplaysDefaultFilter(): void
|
||||
|
|
Loading…
Reference in New Issue