Merge remote-tracking branch 'origin/main' into feature/polls-json
# Conflicts: # docs/deployment.md # docs/operations.md
This commit is contained in:
6 files changed
+4
-220
No files matched your search
@@ -158,53 +158,6 @@ class PollsCommandsTest extends TestCase
|
||||
$this->assertExitError();
|
||||
}
|
||||
|
||||
public function testMenuQuits(): void
|
||||
{
|
||||
$this->exec('polls', ['0']);
|
||||
$this->assertExitSuccess();
|
||||
$this->assertOutputContains('Umfragen verwalten');
|
||||
}
|
||||
|
||||
public function testMenuListsAndOpensPollWithLink(): void
|
||||
{
|
||||
[$poll, $token] = $this->createPoll('Menü-Umfrage', 'menu@example.org');
|
||||
|
||||
$this->exec('polls', ['1', '4', (string)$poll->id, '2', '0', '0']);
|
||||
$this->assertExitSuccess();
|
||||
$this->assertOutputContains('menu@example.org');
|
||||
$this->assertOutputContains('https://plenario.test/admin/' . $token);
|
||||
|
||||
$this->exec('polls', ['4', 'ZZZZZZ', '0']);
|
||||
$this->assertExitSuccess();
|
||||
$this->assertErrorContains('nicht gefunden');
|
||||
}
|
||||
|
||||
public function testMenuDeleteNeedsConfirmation(): void
|
||||
{
|
||||
[$poll] = $this->createPoll();
|
||||
|
||||
$this->exec('polls', ['4', (string)$poll->id, '3', 'n', '0', '0']);
|
||||
$this->assertSame(1, $this->pollsTable()->find()->where(['id' => $poll->id])->count());
|
||||
|
||||
$this->exec('polls', ['4', (string)$poll->id, '3', 'y', '0']);
|
||||
$this->assertSame(0, $this->pollsTable()->find()->where(['id' => $poll->id])->count());
|
||||
}
|
||||
|
||||
public function testMenuCleanupAsksBeforeDeleting(): void
|
||||
{
|
||||
[$old] = $this->createPoll();
|
||||
$this->age($old->id, 100);
|
||||
|
||||
$this->exec('polls', ['6', 'n', '0']);
|
||||
$this->assertSame(1, $this->pollsTable()->find()->count());
|
||||
|
||||
$this->exec('polls', ['6', 'y', '0']);
|
||||
$this->assertSame(0, $this->pollsTable()->find()->count());
|
||||
|
||||
$this->exec('polls', ['6', '0']);
|
||||
$this->assertOutputContains('Nichts zu tun.');
|
||||
}
|
||||
|
||||
public function testReminderGoesOutOnceInTheLastDaysBeforeExpiry(): void
|
||||
{
|
||||
[$young, $youngToken] = $this->createPoll('Jung', 'jung@example.org');
|
||||
|
||||
Reference in new issue
Block a user