1
0
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:
Hillel Coren 2017-11-14 20:07:58 +02:00
parent 435fd5b89e
commit 7dd7fd16ba
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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');
});
}