File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 6262// Ajax
6363
6464test ('visit monitoring store ajax requests ' , function () {
65- \Pest \Laravel \withoutExceptionHandling ();
6665 get ('/ ' , ['X-Requested-With ' => 'XMLHttpRequest ' ]);
6766
6867 // DB Assertions
8079 assertDatabaseMissing (config ('user-monitoring.visit_monitoring.table ' ), ['page ' => 'http:\/\/localhost ' ]);
8180});
8281
82+ test ('visit monitoring skip store when guest mode is off and user not logged in ' , function () {
83+ config ()->set ('user-monitoring.visit_monitoring.guest_mode ' , false );
84+
85+ $ response = get ('/ ' );
86+ $ response ->assertContent ('milwad ' );
87+
88+ // DB Assertions
89+ assertDatabaseCount (config ('user-monitoring.visit_monitoring.table ' ), 0 );
90+ assertDatabaseMissing (config ('user-monitoring.visit_monitoring.table ' ), ['page ' => 'http:\/\/localhost ' ]);
91+ });
92+
8393/**
8494 * Create user.
8595 *
You can’t perform that action at this time.
0 commit comments