File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 123123 assertDatabaseCount (config ('user-monitoring.visit_monitoring.table ' ), 1 );
124124});
125125
126- test ('visit monitoring store when config conditions are true ' , function () {
126+ test ('visit monitoring is store when config conditions are true ' , function () {
127127 config ()->set ('user-monitoring.visit_monitoring.conditions ' , [
128128 function (Request $ request ) {
129129 return true ;
@@ -137,6 +137,20 @@ function (Request $request) {
137137 assertDatabaseCount (config ('user-monitoring.visit_monitoring.table ' ), 1 );
138138});
139139
140+ test ('visit monitoring is not store when config conditions are false ' , function () {
141+ config ()->set ('user-monitoring.visit_monitoring.conditions ' , [
142+ function (Request $ request ) {
143+ return false ;
144+ },
145+ ]);
146+
147+ $ response = get ('/ ' );
148+ $ response ->assertContent ('milwad ' );
149+
150+ // DB Assertions
151+ assertDatabaseCount (config ('user-monitoring.visit_monitoring.table ' ), 0 );
152+ });
153+
140154/**
141155 * Create user and return it.
142156 */
You can’t perform that action at this time.
0 commit comments