mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
✅ Fix “data structure with flags” tests
Following default assuptions changed: 1. The "BILLING_AGREEMENT” feature is always sent 2. The “PAYPAL_WALLET_VAULTING_ADVANCED” flag only depends on the ACDC eligbility (not subscription-opt-in)
This commit is contained in:
parent
ca93ce4b83
commit
cb6fa6eb9f
1 changed files with 3 additions and 3 deletions
|
@ -127,6 +127,7 @@ class PartnerReferralsDataTest extends TestCase {
|
|||
true, // With cards?
|
||||
true, // ACDC eligible?
|
||||
[
|
||||
'capabilities' => [ 'PAYPAL_WALLET_VAULTING_ADVANCED' ],
|
||||
'show_add_credit_card' => true,
|
||||
'has_vault_features' => false,
|
||||
],
|
||||
|
@ -136,6 +137,7 @@ class PartnerReferralsDataTest extends TestCase {
|
|||
false, // With cards?
|
||||
true, // ACDC eligible?
|
||||
[
|
||||
'capabilities' => [ 'PAYPAL_WALLET_VAULTING_ADVANCED' ],
|
||||
'show_add_credit_card' => false,
|
||||
'has_vault_features' => false,
|
||||
],
|
||||
|
@ -249,9 +251,7 @@ class PartnerReferralsDataTest extends TestCase {
|
|||
|
||||
$expected['partner_config_override']['show_add_credit_card'] = $expected_changes['show_add_credit_card'];
|
||||
|
||||
if ( $has_subscriptions ) {
|
||||
$expected['operations'][0]['api_integration_preference']['rest_api_integration']['first_party_details']['features'][] = 'BILLING_AGREEMENT';
|
||||
}
|
||||
$expected['operations'][0]['api_integration_preference']['rest_api_integration']['first_party_details']['features'][] = 'BILLING_AGREEMENT';
|
||||
|
||||
if ( $expected_changes['has_vault_features'] ) {
|
||||
$expected['operations'][0]['api_integration_preference']['rest_api_integration']['first_party_details']['features'][] = 'FUTURE_PAYMENT';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue