Move current unit tests to integration tests
This commit is contained in:
22
tests/integration/API/JSON/v1/MailerTest.php
Normal file
22
tests/integration/API/JSON/v1/MailerTest.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace MailPoet\Test\API\JSON\v1;
|
||||
|
||||
use MailPoet\API\JSON\v1\Mailer;
|
||||
use MailPoet\API\JSON\Response as APIResponse;
|
||||
use MailPoet\Mailer\MailerLog;
|
||||
|
||||
class MailerTest extends \MailPoetTest {
|
||||
function testItResumesSending() {
|
||||
// create mailer log with a "paused" status
|
||||
$mailer_log = array('status' => MailerLog::STATUS_PAUSED);
|
||||
MailerLog::updateMailerLog($mailer_log);
|
||||
$mailer_log = MailerLog::getMailerLog();
|
||||
expect($mailer_log['status'])->equals(MailerLog::STATUS_PAUSED);
|
||||
// resumeSending() method should clear the mailer log's status
|
||||
$mailer_endpoint = new Mailer();
|
||||
$response = $mailer_endpoint->resumeSending();
|
||||
expect($response->status)->equals(APIResponse::STATUS_OK);
|
||||
$mailer_log = MailerLog::getMailerLog();
|
||||
expect($mailer_log['status'])->null();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user