fix gitlab tests
This commit is contained in:
@@ -45,7 +45,7 @@ class InventoryCategoriesControllerTest extends TestCase
|
||||
$categoryId = $this->seedCategory('office');
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$response = $this->patchJson('/api/v1/inventory/categories/'.$categoryId, [
|
||||
$response = $this->patchJson('/api/v1/inventory/categories/' . $categoryId, [
|
||||
'name' => 'Updated',
|
||||
]);
|
||||
|
||||
@@ -59,7 +59,7 @@ class InventoryCategoriesControllerTest extends TestCase
|
||||
$categoryId = $this->seedCategory('office');
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$response = $this->deleteJson('/api/v1/inventory/categories/'.$categoryId);
|
||||
$response = $this->deleteJson('/api/v1/inventory/categories/' . $categoryId);
|
||||
|
||||
$response->assertOk();
|
||||
$this->assertDatabaseMissing('inventory_categories', ['id' => $categoryId]);
|
||||
@@ -101,7 +101,7 @@ class InventoryCategoriesControllerTest extends TestCase
|
||||
{
|
||||
return DB::table('inventory_categories')->insertGetId([
|
||||
'type' => $type,
|
||||
'name' => ucfirst($type).' Category',
|
||||
'name' => ucfirst($type) . ' Category',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
@@ -35,7 +35,7 @@ class InventoryItemsControllerTest extends TestCase
|
||||
$itemId = $this->seedInventoryItem($categoryId);
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$response = $this->getJson('/api/v1/inventory/items/'.$itemId);
|
||||
$response = $this->getJson('/api/v1/inventory/items/' . $itemId);
|
||||
|
||||
$response->assertOk();
|
||||
$response->assertJsonPath('status', true);
|
||||
@@ -70,7 +70,7 @@ class InventoryItemsControllerTest extends TestCase
|
||||
$itemId = $this->seedInventoryItem($categoryId);
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$response = $this->patchJson('/api/v1/inventory/items/'.$itemId, [
|
||||
$response = $this->patchJson('/api/v1/inventory/items/' . $itemId, [
|
||||
'name' => 'Updated Item',
|
||||
]);
|
||||
|
||||
@@ -86,7 +86,7 @@ class InventoryItemsControllerTest extends TestCase
|
||||
$itemId = $this->seedInventoryItem($categoryId);
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$response = $this->deleteJson('/api/v1/inventory/items/'.$itemId);
|
||||
$response = $this->deleteJson('/api/v1/inventory/items/' . $itemId);
|
||||
|
||||
$response->assertOk();
|
||||
$this->assertDatabaseMissing('inventory_items', ['id' => $itemId]);
|
||||
@@ -100,7 +100,7 @@ class InventoryItemsControllerTest extends TestCase
|
||||
$itemId = $this->seedInventoryItem($categoryId);
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$response = $this->postJson('/api/v1/inventory/items/'.$itemId.'/audit', [
|
||||
$response = $this->postJson('/api/v1/inventory/items/' . $itemId . '/audit', [
|
||||
'needs_repair_qty' => 1,
|
||||
'need_replace_qty' => 1,
|
||||
'cannot_find_qty' => 0,
|
||||
@@ -118,7 +118,7 @@ class InventoryItemsControllerTest extends TestCase
|
||||
$itemId = $this->seedInventoryItem($categoryId, 0);
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$response = $this->postJson('/api/v1/inventory/items/'.$itemId.'/adjust', [
|
||||
$response = $this->postJson('/api/v1/inventory/items/' . $itemId . '/adjust', [
|
||||
'mode' => 'in',
|
||||
'quantity' => 2,
|
||||
'reason' => 'Restock',
|
||||
@@ -170,7 +170,7 @@ class InventoryItemsControllerTest extends TestCase
|
||||
$bookId = $this->seedInventoryItem($categoryId, 5, 'book');
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$formResponse = $this->getJson('/api/v1/inventory/teacher-distribution?class_section_id='.$classSectionId.'&item_id='.$bookId);
|
||||
$formResponse = $this->getJson('/api/v1/inventory/teacher-distribution?class_section_id=' . $classSectionId . '&item_id=' . $bookId);
|
||||
$formResponse->assertOk();
|
||||
|
||||
$storeResponse = $this->postJson('/api/v1/inventory/teacher-distribution', [
|
||||
@@ -233,7 +233,7 @@ class InventoryItemsControllerTest extends TestCase
|
||||
{
|
||||
return DB::table('inventory_categories')->insertGetId([
|
||||
'type' => $type,
|
||||
'name' => ucfirst($type).' Category',
|
||||
'name' => ucfirst($type) . ' Category',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
@@ -244,7 +244,7 @@ class InventoryItemsControllerTest extends TestCase
|
||||
return DB::table('inventory_items')->insertGetId([
|
||||
'type' => $type,
|
||||
'category_id' => $categoryId,
|
||||
'name' => 'Item '.$type,
|
||||
'name' => 'Item ' . $type,
|
||||
'quantity' => $quantity,
|
||||
'semester' => 'Fall',
|
||||
'school_year' => '2025-2026',
|
||||
|
||||
@@ -49,7 +49,7 @@ class InventoryMovementsControllerTest extends TestCase
|
||||
$movementId = $this->seedMovement($itemId);
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$response = $this->patchJson('/api/v1/inventory/movements/'.$movementId, [
|
||||
$response = $this->patchJson('/api/v1/inventory/movements/' . $movementId, [
|
||||
'qty_change' => 3,
|
||||
'movement_type' => 'in',
|
||||
]);
|
||||
@@ -65,7 +65,7 @@ class InventoryMovementsControllerTest extends TestCase
|
||||
$movementId = $this->seedMovement($itemId);
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$response = $this->deleteJson('/api/v1/inventory/movements/'.$movementId);
|
||||
$response = $this->deleteJson('/api/v1/inventory/movements/' . $movementId);
|
||||
|
||||
$response->assertOk();
|
||||
$this->assertDatabaseMissing('inventory_movements', ['id' => $movementId]);
|
||||
|
||||
@@ -45,7 +45,7 @@ class SuppliersControllerTest extends TestCase
|
||||
$supplierId = $this->seedSupplier('Supplier C');
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$response = $this->patchJson('/api/v1/inventory/suppliers/'.$supplierId, [
|
||||
$response = $this->patchJson('/api/v1/inventory/suppliers/' . $supplierId, [
|
||||
'name' => 'Supplier Updated',
|
||||
]);
|
||||
|
||||
@@ -59,7 +59,7 @@ class SuppliersControllerTest extends TestCase
|
||||
$supplierId = $this->seedSupplier('Supplier D');
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$response = $this->deleteJson('/api/v1/inventory/suppliers/'.$supplierId);
|
||||
$response = $this->deleteJson('/api/v1/inventory/suppliers/' . $supplierId);
|
||||
|
||||
$response->assertOk();
|
||||
$this->assertDatabaseMissing('suppliers', ['id' => $supplierId]);
|
||||
|
||||
@@ -44,7 +44,7 @@ class SupplyCategoriesControllerTest extends TestCase
|
||||
$categoryId = $this->seedCategory('Pens');
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$response = $this->patchJson('/api/v1/inventory/supply-categories/'.$categoryId, [
|
||||
$response = $this->patchJson('/api/v1/inventory/supply-categories/' . $categoryId, [
|
||||
'name' => 'Pens Updated',
|
||||
]);
|
||||
|
||||
@@ -58,7 +58,7 @@ class SupplyCategoriesControllerTest extends TestCase
|
||||
$categoryId = $this->seedCategory('Markers');
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
$response = $this->deleteJson('/api/v1/inventory/supply-categories/'.$categoryId);
|
||||
$response = $this->deleteJson('/api/v1/inventory/supply-categories/' . $categoryId);
|
||||
|
||||
$response->assertOk();
|
||||
$this->assertDatabaseMissing('supply_categories', ['id' => $categoryId]);
|
||||
|
||||
Reference in New Issue
Block a user