Skip to content

Commit

Permalink
Merge pull request #36 from biigle/laravel-10
Browse files Browse the repository at this point in the history
Update tests for Laravel 10
  • Loading branch information
mzur authored Oct 4, 2023
2 parents c078005 + d803529 commit ee1d786
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Http/Controllers/Api/Import/ImportControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function testStore()
$user = UserTest::create();
$path = (new UserExport([$user->id]))->getArchive();

$wrongFile = new UploadedFile($path, 'file.txt', 'text/plain', null, true);
$wrongFile = UploadedFile::fake()->create('file.txt', 10, 'text/plain');
$file = new UploadedFile($path, 'biigle_user_export.zip', 'application/zip', null, true);

$this->doTestApiRoute('POST', '/api/v1/import');
Expand All @@ -41,7 +41,7 @@ public function testStore()
$this->beGlobalAdmin();
$this->json('POST', '/api/v1/import')->assertStatus(422);

$this->json('POST', '/api/v1/import', [], [], ['archive' => $wrongFile])
$this->json('POST', '/api/v1/import', ['archive' => $wrongFile])
->assertStatus(422);

$this->call('POST', '/api/v1/import', [], [], ['archive' => $file])
Expand Down

0 comments on commit ee1d786

Please sign in to comment.