From 3ae193d34e6180242e72917ba4bf4a31a139dd12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Ferreira?= Date: Sat, 25 Jan 2025 09:43:02 +0000 Subject: [PATCH] test: Update view event test case with additional events --- tests/Unit/Jobs/IngestActivityTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/Unit/Jobs/IngestActivityTest.php b/tests/Unit/Jobs/IngestActivityTest.php index 192d4b0..e307e45 100644 --- a/tests/Unit/Jobs/IngestActivityTest.php +++ b/tests/Unit/Jobs/IngestActivityTest.php @@ -18,6 +18,8 @@ EventType::viewDuration('/about', 6), EventType::view('/about'), EventType::viewDuration('/about', 2), + EventType::view('/about'), + EventType::viewDuration('/about', 4), ], ]); @@ -32,8 +34,8 @@ expect($activity->fresh())->toBeNull() ->and(Page::count())->toBe(1) ->and($page->path)->toBe('about') - ->and($page->views)->toBe(2) - ->and($page->average_time)->toBe(7) + ->and($page->views)->toBe(3) + ->and($page->average_time)->toBe(6) ->and($page->bucket->format('Y-m-d H:i:s'))->toBe(now()->format('Y-m-d H:00:00')); });