Change PDF engine for tests

This commit is contained in:
David Bomba 2025-01-06 16:29:24 +11:00
parent d6c337352f
commit 6e3ea0043b
4 changed files with 5 additions and 17 deletions

View File

@ -41,6 +41,7 @@ jobs:
NINJA_LICENSE: ${{ secrets.ninja_license }}
TRAVIS: true
MAIL_MAILER: log
PDF_GENERATOR: hosted_ninja
services:
mariadb:

View File

@ -23,15 +23,10 @@ use App\Utils\Ninja;
function nlog($output, $context = []): void
{
if (getenv('GITHUB_ACTIONS')) {
// Debug level
echo "::debug::".print_r($output, true)."\n";
// Different log levels available:
// echo "::notice::$message\n";
// echo "::warning::$message\n";
// echo "::error::$message\n";
}
// if (getenv('GITHUB_ACTIONS')) {
// // Debug level
// echo "::debug::".print_r($output, true)."\n";
// }
if (! config('ninja.expanded_logging')) {
return;

View File

@ -822,8 +822,6 @@ class ClientApiTest extends TestCase
'X-API-TOKEN' => $this->token,
])->postJson('/api/v1/client_statement', $data);
echo (print_r($response->getContent(), true));
$response->assertStatus(200);
$this->assertTrue($response->headers->get('content-type') == 'application/pdf');

View File

@ -115,9 +115,6 @@ class PurchaseOrderTest extends TestCase
'X-API-TOKEN' => $this->token,
])->postJson("/api/v1/purchase_orders/bulk", $data);
echo $response->getContent();
$response->assertStatus(200);
@ -131,9 +128,6 @@ class PurchaseOrderTest extends TestCase
'X-API-TOKEN' => $this->token,
])->postJson("/api/v1/purchase_orders/bulk", $data);
echo(print_r($response->getContent(), true));
$response->assertStatus(200);
$data = [