mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
Working in tests...
This commit is contained in:
parent
435fd5b89e
commit
7dd7fd16ba
@ -256,7 +256,7 @@ class PaymentMethod extends EntityModel
|
||||
PaymentMethod::deleting(function ($paymentMethod) {
|
||||
$accountGatewayToken = $paymentMethod->account_gateway_token;
|
||||
if ($accountGatewayToken->default_payment_method_id == $paymentMethod->id) {
|
||||
$newDefault = $accountGatewayToken->payment_methods->first(function ($i, $paymentMethdod) use ($accountGatewayToken) {
|
||||
$newDefault = $accountGatewayToken->payment_methods->first(function ($paymentMethdod) use ($accountGatewayToken) {
|
||||
return $paymentMethdod->id != $accountGatewayToken->default_payment_method_id;
|
||||
});
|
||||
$accountGatewayToken->default_payment_method_id = $newDefault ? $newDefault->id : null;
|
||||
|
@ -132,7 +132,7 @@ class AcceptanceTester extends \Codeception\Actor
|
||||
$I->selectOption('#expiration_month', 12);
|
||||
$I->selectOption('#expiration_year', date('Y'));
|
||||
$I->click('.btn-success');
|
||||
$I->wait(3);
|
||||
$I->wait(5);
|
||||
$I->see('Successfully applied payment');
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user