Skip to content

Commit 3bc2c0d

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

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
@@ -329,3 +329,19 @@
329329
// DB Assertions
330330
assertDatabaseCount(config('user-monitoring.action_monitoring.table'), 2);
331331
});
332+
333+
test('action stored when the guest mode is off and user logged in', function () {
334+
config()->set('user-monitoring.action_monitoring.guest_mode', false);
335+
336+
$user = createUser();
337+
auth()->login($user);
338+
339+
$product = Product::query()->create([
340+
'title' => 'milwad',
341+
'description' => 'WE ARE HELPING TO OPEN-SOURCE WORLD'
342+
]);
343+
$product->delete();
344+
345+
// DB Assertions
346+
assertDatabaseCount(config('user-monitoring.action_monitoring.table'), 2);
347+
});

0 commit comments

Comments
 (0)