fix: repair 4 pre-existing failing tests
- WorkOrderCalcTest: vehicle fixture used `brand` (column is `make`, NOT NULL) and WorkOrderPart used `price`/manual total (column is `sell_price`, total is auto-computed). Switched to correct columns + valid status. - ExampleTest: stock test expected 200 on `/` but the central domain redirects to /admin. Replaced with a deterministic central-root → /admin redirect check. Full suite now green: 99 passed, 0 failed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,12 +8,12 @@ use Tests\TestCase;
|
|||||||
class ExampleTest extends TestCase
|
class ExampleTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* A basic test example.
|
* On the central domain, the root path redirects to the admin panel.
|
||||||
*/
|
*/
|
||||||
public function test_the_application_returns_a_successful_response(): void
|
public function test_central_root_redirects_to_admin(): void
|
||||||
{
|
{
|
||||||
$response = $this->get('/');
|
$response = $this->get('http://service.mir.md/');
|
||||||
|
|
||||||
$response->assertStatus(200);
|
$response->assertRedirect('/admin');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,9 +50,8 @@ class WorkOrderCalcTest extends TestCase
|
|||||||
'work_order_id' => $wo->id,
|
'work_order_id' => $wo->id,
|
||||||
'name' => 'Filtru',
|
'name' => 'Filtru',
|
||||||
'qty' => 2,
|
'qty' => 2,
|
||||||
'price' => 150,
|
'sell_price' => 150,
|
||||||
'total' => 300,
|
'status' => 'needed',
|
||||||
'status' => 'pending',
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$wo->refresh();
|
$wo->refresh();
|
||||||
@@ -93,7 +92,7 @@ class WorkOrderCalcTest extends TestCase
|
|||||||
$vehicle = Vehicle::create([
|
$vehicle = Vehicle::create([
|
||||||
'client_id' => $client->id,
|
'client_id' => $client->id,
|
||||||
'plate' => 'TST 001',
|
'plate' => 'TST 001',
|
||||||
'brand' => 'Test',
|
'make' => 'Test',
|
||||||
'model' => 'X',
|
'model' => 'X',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user