|
|
|
|
@ -7,7 +7,7 @@ use Illuminate\Foundation\Testing\WithFaker; |
|
|
|
|
use Illuminate\Http\Testing\File; |
|
|
|
|
use Tests\TestCase; |
|
|
|
|
|
|
|
|
|
class UploadJsonTest extends TestCase |
|
|
|
|
class ConvertJsonTest extends TestCase |
|
|
|
|
{ |
|
|
|
|
/** |
|
|
|
|
* upload json file. |
|
|
|
|
@ -18,12 +18,12 @@ class UploadJsonTest extends TestCase |
|
|
|
|
*/ |
|
|
|
|
public function test_example() |
|
|
|
|
{ |
|
|
|
|
$content = file_get_contents(base_path('/tests/Storage/Feature/Upload/UploadJsonTest.json')); |
|
|
|
|
$content = file_get_contents(base_path('/tests/Storage/Feature/Upload/ConvertJsonTest.json')); |
|
|
|
|
$file = File::createWithContent( |
|
|
|
|
'test.json', |
|
|
|
|
$content |
|
|
|
|
); |
|
|
|
|
$this->post('/api/v1/upload/json', [ |
|
|
|
|
$this->post('/api/v1/convert/json', [ |
|
|
|
|
'file' => $file, |
|
|
|
|
'format' => 'json' |
|
|
|
|
])->assertSuccessful(); |