@@ -93,6 +93,7 @@ class UploadedFilesController extends Controller
|
||||
'id',
|
||||
'filename',
|
||||
'action_type',
|
||||
'action_date',
|
||||
'note',
|
||||
'created_at',
|
||||
];
|
||||
|
||||
@@ -103,7 +103,7 @@ class AccessoryFilesTest extends TestCase
|
||||
// Upload a file
|
||||
$this->actingAsForApi($user)
|
||||
->post(
|
||||
route('api.files.store', ['object_type' => 'accessories', 'id' => $accessory->id]), [
|
||||
route('api.files.store', ['object_type' => 'accessories', 'id' => $accessory->id, 'order' => 'asc']), [
|
||||
'file' => [UploadedFile::fake()->create("test.jpg", 100)],
|
||||
]
|
||||
)
|
||||
|
||||
@@ -134,7 +134,7 @@ class AssetModelFilesTest extends TestCase
|
||||
// List the files to get the file ID
|
||||
$result = $this->actingAsForApi($user)
|
||||
->getJson(
|
||||
route('api.files.index', ['object_type' => 'models', 'id' => $model->id])
|
||||
route('api.files.index', ['object_type' => 'models', 'id' => $model->id, 'order' => 'asc'])
|
||||
)
|
||||
->assertOk()
|
||||
->assertJsonStructure(
|
||||
|
||||
@@ -103,7 +103,7 @@ class ConsumableFileTest extends TestCase
|
||||
// Upload a file
|
||||
$this->actingAsForApi($user)
|
||||
->post(
|
||||
route('api.files.store', ['object_type' => 'consumables', 'id' => $consumable->id]), [
|
||||
route('api.files.store', ['object_type' => 'consumables', 'id' => $consumable->id, 'order' => 'asc']), [
|
||||
'file' => [UploadedFile::fake()->create("test.jpg", 100)],
|
||||
]
|
||||
)
|
||||
|
||||
@@ -134,7 +134,7 @@ class LicenseUploadTest extends TestCase
|
||||
// List the files to get the file ID
|
||||
$result = $this->actingAsForApi($user)
|
||||
->getJson(
|
||||
route('api.files.index', ['object_type' => 'licenses', 'id' => $license->id])
|
||||
route('api.files.index', ['object_type' => 'licenses', 'id' => $license->id, 'order' => 'asc'])
|
||||
)
|
||||
->assertOk()
|
||||
->assertJsonStructure(
|
||||
|
||||
@@ -132,7 +132,7 @@ class LocationFileTest extends TestCase
|
||||
// List the files to get the file ID
|
||||
$result = $this->actingAsForApi($user)
|
||||
->getJson(
|
||||
route('api.files.index', ['object_type' => 'locations', 'id' => $location->id])
|
||||
route('api.files.index', ['object_type' => 'locations', 'id' => $location->id, 'order' => 'asc'])
|
||||
)
|
||||
->assertOk()
|
||||
->assertJsonStructure(
|
||||
|
||||
@@ -131,7 +131,7 @@ class UserFileTest extends TestCase
|
||||
// List the files to get the file ID
|
||||
$result = $this->actingAsForApi($admin)
|
||||
->getJson(
|
||||
route('api.files.index', ['object_type' => 'users', 'id' => $user->id])
|
||||
route('api.files.index', ['object_type' => 'users', 'id' => $user->id, 'order' => 'asc'])
|
||||
)
|
||||
->assertOk()
|
||||
->assertJsonStructure(
|
||||
|
||||
Reference in New Issue
Block a user