update
This commit is contained in:
@@ -105,7 +105,7 @@ it('following tab returns 200 for users with no follows', function () {
|
||||
$user = User::factory()->create();
|
||||
|
||||
$this->actingAs($user)
|
||||
->get('/community/activity?type=following')
|
||||
->get('/community/activity?filter=following')
|
||||
->assertStatus(200);
|
||||
});
|
||||
|
||||
@@ -127,10 +127,12 @@ it('following tab shows only events from followed users', function () {
|
||||
// Event from non-followed user (should not appear)
|
||||
ActivityEvent::record($other->id, ActivityEvent::TYPE_UPLOAD, ActivityEvent::TARGET_ARTWORK, $artwork->id);
|
||||
|
||||
$response = $this->actingAs($user)->get('/community/activity?type=following');
|
||||
$response = $this->actingAs($user)->get('/community/activity?filter=following');
|
||||
$response->assertStatus(200);
|
||||
|
||||
$events = $response->original->gatherData()['events'];
|
||||
expect($events->total())->toBe(1);
|
||||
expect($events->first()->actor_id)->toBe($creator->id);
|
||||
$props = $response->viewData('props');
|
||||
$events = collect($props['initialActivities'] ?? []);
|
||||
|
||||
expect($events)->toHaveCount(1);
|
||||
expect(data_get($events->first(), 'user.id'))->toBe($creator->id);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user