PMCORE-764 No "test mail" is registered in "Logs" in the "Emails" option
This commit is contained in:
@@ -4,6 +4,7 @@ namespace Tests\unit\workflow\engine\methods\emailServer;
|
||||
|
||||
use Faker\Factory;
|
||||
use Google_Auth_Exception;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use ProcessMaker\GmailOAuth\GmailOAuth;
|
||||
use ProcessMaker\Model\User;
|
||||
use RBAC;
|
||||
@@ -12,7 +13,7 @@ use Tests\TestCase;
|
||||
class EmailServerGmailOAuthTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* This test expects an exception from the Google client.
|
||||
* This test expects an error message stored in the cache.
|
||||
* The Google client requires valid codes to obtain the clientId from a request,
|
||||
* otherwise it will throw an exception.
|
||||
* @test
|
||||
@@ -40,7 +41,7 @@ class EmailServerGmailOAuthTest extends TestCase
|
||||
*/
|
||||
$_GET['code'] = $faker->regexify("/[1-9]\/[a-zA-Z]{25}-[a-zA-Z]{16}_[a-zA-Z]{19}-[a-zA-Z]{24}/");
|
||||
|
||||
$this->expectException(Google_Auth_Exception::class);
|
||||
require_once PATH_METHODS . 'emailServer/emailServerGmailOAuth.php';
|
||||
$this->assertTrue(Cache::has('errorMessageIfNotAuthenticate'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user