Skip to content

Commit

Permalink
Update FileTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
railken committed Mar 28, 2024
1 parent e029c50 commit 1988eae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/Http/FileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ class FileTest extends Base
*/
public function testHttpUpload()
{
$response = $this->callAndTest('POST', route('data.create', ['name' => 'file']), ['name' => 'yolo'], 201);
$nameFile = 'lorem';

$response = $this->callAndTest('POST', route('data.create', ['name' => 'file']), ['name' => $nameFile], 201);
$body = json_decode($response->getContent());

$response = $this->callAndTest('POST', route('app.file.upload', ['id' => $body->data->id]), [
Expand All @@ -46,7 +48,7 @@ public function testHttpUpload()

$body = json_decode($response->getContent());

$response = $this->callAndTest('GET', route('app.file.stream', ['id' => $body->data->id, 'name' => 'yolo']), [], 200);
$response = $this->callAndTest('GET', route('app.file.stream', ['id' => $body->data->id, 'name' => $nameFile]), [], 200);
}

}

0 comments on commit 1988eae

Please sign in to comment.