We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
action is not stored when config conditions are false
1 parent 2b5c9f8 commit 02d0a80Copy full SHA for 02d0a80
tests/Feature/ActionMonitoringTest.php
@@ -378,3 +378,19 @@ function (Request $request) {
378
// DB Assertions
379
assertDatabaseCount(config('user-monitoring.action_monitoring.table'), 1);
380
});
381
+
382
+test('action is not stored when config conditions are false', function () {
383
+ config()->set('user-monitoring.action_monitoring.conditions', [
384
+ function (Request $request) {
385
+ return false;
386
+ },
387
+ ]);
388
389
+ Product::query()->create([
390
+ 'title' => 'milwad',
391
+ 'description' => 'WE ARE HELPING TO OPEN-SOURCE WORLD'
392
393
394
+ // DB Assertions
395
+ assertDatabaseCount(config('user-monitoring.action_monitoring.table'), 0);
396
+});
0 commit comments