Skip to content

Commit f55422f

Browse files
committed
add visit monitoring store when guest mode is off and user logged in test
1 parent 17770bd commit f55422f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Feature/VisitMonitoringTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,17 @@
9090
assertDatabaseMissing(config('user-monitoring.visit_monitoring.table'), ['page' => 'http:\/\/localhost']);
9191
});
9292

93+
test('visit monitoring store when guest mode is off and user logged in', function () {
94+
config()->set('user-monitoring.visit_monitoring.guest_mode', false);
95+
96+
$user = createUser();
97+
$response = actingAs($user)->get('/');
98+
$response->assertContent('milwad');
99+
100+
// DB Assertions
101+
assertDatabaseCount(config('user-monitoring.visit_monitoring.table'), 1);
102+
});
103+
93104
/**
94105
* Create user.
95106
*

0 commit comments

Comments
 (0)