Files
piratepoet/tests/unit/API/SetupTest.php
Jonathan Labreuille 28c39d301c Added default error response in case no errors were specified
- converted Setup endpoint
- unit tests for Setup endpoint
2016-08-03 12:41:21 +02:00

23 lines
562 B
PHP

<?php
use \MailPoet\API\Response;
use \MailPoet\API\Endpoints\Setup;
use \MailPoet\Models\Setting;
class SetupTest extends MailPoetTest {
function _before() {
Setting::setValue('signup_confirmation.enabled', false);
}
function testItCanReinstall() {
$router = new Setup();
$response = $router->reset();
expect($response->status)->equals(Response::STATUS_OK);
$signup_confirmation = Setting::getValue('signup_confirmation.enabled');
expect($signup_confirmation)->true();
}
function _after() {
Setting::deleteMany();
}
}