File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
tests/Authentication/Filters Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,10 @@ public function testRecordActiveDate(): void
54
54
$ this ->withSession (['user ' => ['id ' => $ user ->id ]])
55
55
->get ('protected-route ' );
56
56
57
+ $ updated_at = auth ('session ' )->user ()->updated_at ;
58
+ $ last_active = auth ('session ' )->user ()->last_active ;
59
+
57
60
// Last Active should be greater than 'updated_at' column
58
- $ this ->assertGreaterThan ( auth ( ' session ' )-> user ()-> updated_at , auth ( ' session ' )-> user ()-> last_active );
61
+ $ this ->assertTrue ( $ last_active -> isAfter ( $ updated_at) );
59
62
}
60
63
}
Original file line number Diff line number Diff line change @@ -60,7 +60,10 @@ public function testRecordActiveDate(): void
60
60
$ this ->withHeaders (['Authorization ' => 'Bearer ' . $ token ->raw_token ])
61
61
->get ('protected-route ' );
62
62
63
+ $ updated_at = auth ('session ' )->user ()->updated_at ;
64
+ $ last_active = auth ('session ' )->user ()->last_active ;
65
+
63
66
// Last Active should be greater than 'updated_at' column
64
- $ this ->assertGreaterThan ( auth ( ' tokens ' )-> user ()-> updated_at , auth ( ' tokens ' )-> user ()-> last_active );
67
+ $ this ->assertTrue ( $ last_active -> isAfter ( $ updated_at) );
65
68
}
66
69
}
You can’t perform that action at this time.
0 commit comments