diff --git a/ext/terms/test.php b/ext/terms/test.php new file mode 100644 index 00000000..3b23743e --- /dev/null +++ b/ext/terms/test.php @@ -0,0 +1,27 @@ +request('GET', 'post/list', cookies: []); + $this->assert_text("terms-modal-enter"); + } + + public function testLoggedIn(): void + { + $this->log_in_as_user(); + $this->request('GET', 'post/list', cookies: []); + $this->assert_no_text("terms-modal-enter"); + } + + public function testCookie(): void + { + $this->request('GET', 'post/list', cookies: ['shm_accepted_terms' => 'true']); + $this->assert_no_text("terms-modal-enter"); + } +}