@@ -2,9 +2,10 @@
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Http\Middleware\EnsureSimulationRecoveryCookie;
|
||||
use App\Models\SimulationFormDraft;
|
||||
use App\Models\User;
|
||||
use App\Http\Middleware\EnsureSimulationRecoveryCookie;
|
||||
use Illuminate\Database\QueryException;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -100,7 +101,7 @@ class SimulationDraftContinuityTest extends TestCase
|
||||
public function test_database_details_are_not_returned_by_simulation_draft_api_errors(): void
|
||||
{
|
||||
Route::get('/api/v1/simulation-drafts/synthetic-failure/force', function (): never {
|
||||
throw new \Illuminate\Database\QueryException('pgsql', 'select * from private_draft_table', ['private-token'], new \PDOException('private-db-name relation missing'));
|
||||
throw new QueryException('pgsql', 'select * from private_draft_table', ['private-token'], new \PDOException('private-db-name relation missing'));
|
||||
});
|
||||
|
||||
$this->getJson('/api/v1/simulation-drafts/synthetic-failure/force')->assertStatus(500)
|
||||
|
||||
Reference in New Issue
Block a user