Update the captcha setting [MAILPOET-2015]

This commit is contained in:
wxa
2019-07-03 12:59:06 +03:00
committed by M. Shull
parent e022d5a9de
commit f8ea514887
6 changed files with 86 additions and 34 deletions

View File

@@ -8,6 +8,7 @@ use MailPoet\WP\Functions as WPFunctions;
use Helper\WordPressHooks as WPHooksHelper;
use MailPoet\API\JSON\Response as APIResponse;
use MailPoet\Settings\SettingsController;
use MailPoet\Subscription\Captcha;
class SetupTest extends \MailPoetTest {
function _before() {
@@ -29,6 +30,13 @@ class SetupTest extends \MailPoetTest {
$signup_confirmation = $settings->fetch('signup_confirmation.enabled');
expect($signup_confirmation)->true();
$captcha = $settings->fetch('captcha');
$subscription_captcha = new Captcha;
$captcha_type = $subscription_captcha->isSupported() ? Captcha::TYPE_BUILTIN : Captcha::TYPE_DISABLED;
expect($captcha['type'])->equals($captcha_type);
expect($captcha['recaptcha_site_token'])->equals('');
expect($captcha['recaptcha_secret_token'])->equals('');
$woocommerce_optin_on_checkout = $settings->fetch('woocommerce.optin_on_checkout');
expect($woocommerce_optin_on_checkout['enabled'])->true();