Skip to content

Commit 0bacc5c

Browse files
committed
verify that future policies are excluded
1 parent 3c96fd5 commit 0bacc5c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/Routes/PoliciesControllerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ public function testMissingPoliciesReturnsOnlyLatestCurrentPolicyPerType(): void
3131
$user = User::factory()->create();
3232
$now = CarbonImmutable::now();
3333

34+
// Future policy (should be ignored because it is not active yet)
35+
$this->createPolicy('terms-of-use', $now->addDays(10), 'terms-of-use/version-future.vue');
36+
3437
$olderTerms = $this->createPolicy('terms-of-use', $now->subDays(10), 'terms-of-use/version-1.vue');
3538
$latestTerms = $this->createPolicy('terms-of-use', $now->subDays(1), 'terms-of-use/version-2.vue');
3639
$this->createPolicy('terms-of-use', $now->addDays(1), 'terms-of-use/version-3.vue');

0 commit comments

Comments
 (0)