diff --git a/app/Import/Providers/BaseImport.php b/app/Import/Providers/BaseImport.php index fb196121b1f2..b8525022c476 100644 --- a/app/Import/Providers/BaseImport.php +++ b/app/Import/Providers/BaseImport.php @@ -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.'%' ) diff --git a/tests/Feature/CompanyGatewayResolutionTest.php b/tests/Feature/CompanyGatewayResolutionTest.php index df01d5614ace..3dd633644440 100644 --- a/tests/Feature/CompanyGatewayResolutionTest.php +++ b/tests/Feature/CompanyGatewayResolutionTest.php @@ -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)); diff --git a/tests/Feature/EntityPaidToDateTest.php b/tests/Feature/EntityPaidToDateTest.php index 3212ff63d7a6..d706a53619e9 100644 --- a/tests/Feature/EntityPaidToDateTest.php +++ b/tests/Feature/EntityPaidToDateTest.php @@ -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 { diff --git a/tests/Integration/EventTest.php b/tests/Integration/EventTest.php index 2d4477bead4c..37100f380b7d 100644 --- a/tests/Integration/EventTest.php +++ b/tests/Integration/EventTest.php @@ -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', ];