mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for tests
This commit is contained in:
parent
19a991e4c3
commit
6855be8b34
@ -13,6 +13,7 @@ namespace Tests\Feature;
|
||||
|
||||
use App\Models\Client;
|
||||
use App\Models\CompanyGateway;
|
||||
use App\Models\Credit;
|
||||
use App\Models\GatewayType;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@ -128,11 +129,17 @@ class CompanyGatewayResolutionTest extends TestCase
|
||||
$this->client->country_id = 840;
|
||||
$this->client->save();
|
||||
|
||||
Credit::query()->withTrashed()->cursor()->each(function ($c) {
|
||||
$c->forceDelete();
|
||||
});
|
||||
|
||||
$this->assertInstanceOf('\\stdClass', $this->cg->fees_and_limits);
|
||||
// $this->assertObjectHasAttribute('min_limit', $this->cg->fees_and_limits->{1});
|
||||
$this->assertNotNull($this->cg->fees_and_limits->{1}->min_limit);
|
||||
$payment_methods = $this->client->service()->getPaymentMethods($amount);
|
||||
|
||||
nlog($payment_methods);
|
||||
|
||||
$this->assertEquals(2, count($payment_methods));
|
||||
}
|
||||
|
||||
@ -144,6 +151,10 @@ class CompanyGatewayResolutionTest extends TestCase
|
||||
$cg->forceDelete();
|
||||
});
|
||||
|
||||
Credit::query()->withTrashed()->cursor()->each(function ($c) {
|
||||
$c->forceDelete();
|
||||
});
|
||||
|
||||
$data = [];
|
||||
$data[1]['min_limit'] = -1;
|
||||
$data[1]['max_limit'] = -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user