Merge pull request 'Remove dead code and validate new polls only once' (#33) from chore/remove-dead-code into main
CI / Deploy / test (push) Successful in 52s
CI / Deploy / deploy (push) Successful in 5s

Reviewed-on: #33
This commit was merged in pull request #33.
This commit is contained in:
gnilebein committed 2026-11-08 22:32:02 +01:00
commit a62e13eeff
13 files changed
+78 -102

No files matched your search

@@ -70,6 +70,17 @@ class HomeControllerTest extends TestCase
$this->assertResponseNotContains('/admin/', 'Admin link must not be shown when disabled');
}
public function testCreateAcceptsEmailWithSurroundingSpaces(): void
{
$this->session(['Captcha.math.create' => 7]);
$this->post('/create', ['title' => ' Retro ', 'email' => ' Owner@Example.org ', 'captcha_answer' => '7']);
$this->assertRedirect(['_name' => 'created']);
$poll = $this->pollsTable()->find()->firstOrFail();
$this->assertSame('Retro', $poll->title);
$this->assertSame('owner@example.org', $poll->email);
}
public function testIndexRendersHiddenHoneypot(): void
{
$this->get('/');