Skip to content

Commit a6f564f

Browse files
committed
add action stored when the guest mode is on and user logged in test
1 parent 3bc2c0d commit a6f564f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/Feature/ActionMonitoringTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,3 +345,19 @@
345345
// DB Assertions
346346
assertDatabaseCount(config('user-monitoring.action_monitoring.table'), 2);
347347
});
348+
349+
test('action stored when the guest mode is on and user logged in', function () {
350+
config()->set('user-monitoring.action_monitoring.guest_mode', true);
351+
352+
$user = createUser();
353+
auth()->login($user);
354+
355+
$product = Product::query()->create([
356+
'title' => 'milwad',
357+
'description' => 'WE ARE HELPING TO OPEN-SOURCE WORLD'
358+
]);
359+
$product->delete();
360+
361+
// DB Assertions
362+
assertDatabaseCount(config('user-monitoring.action_monitoring.table'), 2);
363+
});

0 commit comments

Comments
 (0)