mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 14:12:44 +01:00
Fixes for query grammar
This commit is contained in:
parent
cd06dc551a
commit
a6d7584e14
@ -734,7 +734,7 @@ class BaseImport
|
||||
{
|
||||
$user = User::where('account_id', $this->company->account->id)
|
||||
->where(
|
||||
\DB::raw('CONCAT_WS(" ", first_name, last_name)')->getValue(DB::connection()->getQueryGrammar()),
|
||||
\DB::raw('CONCAT_WS(" ", first_name, last_name)')->getValue(\DB::connection()->getQueryGrammar()),
|
||||
'like',
|
||||
'%'.$user_hash.'%'
|
||||
)
|
||||
|
@ -124,8 +124,8 @@ class CompanyGatewayResolutionTest extends TestCase
|
||||
$amount = 10;
|
||||
|
||||
$this->assertInstanceOf('\\stdClass', $this->cg->fees_and_limits);
|
||||
$this->assertObjectHasAttribute('min_limit', $this->cg->fees_and_limits->{1});
|
||||
|
||||
// $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);
|
||||
|
||||
$this->assertEquals(2, count($payment_methods));
|
||||
|
@ -17,7 +17,7 @@ use App\Models\Invoice;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Foundation\Testing\WithoutEvents;
|
||||
// use Illuminate\Foundation\Testing\WithoutEvents;
|
||||
use Illuminate\Routing\Middleware\ThrottleRequests;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Tests\MockAccountData;
|
||||
@ -31,7 +31,7 @@ class EntityPaidToDateTest extends TestCase
|
||||
use MakesHash;
|
||||
use DatabaseTransactions;
|
||||
use MockAccountData;
|
||||
use WithoutEvents;
|
||||
// use WithoutEvents;
|
||||
|
||||
protected function setUp() :void
|
||||
{
|
||||
|
@ -15,6 +15,7 @@ use Tests\TestCase;
|
||||
use App\Models\Quote;
|
||||
use App\Models\Invoice;
|
||||
use Tests\MockAccountData;
|
||||
use App\Models\PurchaseOrder;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use App\Events\Task\TaskWasCreated;
|
||||
use App\Events\Task\TaskWasDeleted;
|
||||
@ -93,6 +94,8 @@ class EventTest extends TestCase
|
||||
use MakesHash;
|
||||
use DatabaseTransactions;
|
||||
|
||||
public $faker;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
@ -586,7 +589,7 @@ class EventTest extends TestCase
|
||||
'X-API-TOKEN' => $this->token,
|
||||
])->postJson('/api/v1/recurring_invoices/', $data);
|
||||
} catch (ValidationException $e) {
|
||||
$message = json_decode($e->validator->getMessageBag(), 1);
|
||||
// $message = json_decode($e->validator->getMessageBag(), 1);
|
||||
}
|
||||
|
||||
$response->assertStatus(200);
|
||||
@ -846,17 +849,16 @@ class EventTest extends TestCase
|
||||
}
|
||||
|
||||
|
||||
public function PurchaseOrderEvents()
|
||||
public function testPurchaseOrderEvents()
|
||||
{
|
||||
/* Test fire new invoice */
|
||||
$data = [
|
||||
'client_id' => $this->vendor->hashed_id,
|
||||
'vendor_id' => $this->vendor->hashed_id,
|
||||
'number' => 'dude',
|
||||
];
|
||||
|
||||
Event::fake();
|
||||
|
||||
|
||||
$response = $this->withHeaders([
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $this->token,
|
||||
@ -867,7 +869,7 @@ class EventTest extends TestCase
|
||||
$arr = $response->json();
|
||||
|
||||
$data = [
|
||||
'client_id' => $this->vendor->hashed_id,
|
||||
'vendor_id' => $this->vendor->hashed_id,
|
||||
'number' => 'dude2',
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user