Files
monica/tests/Feature/ExportAccountAsSQLTest.php
T
2021-05-14 15:03:19 +02:00

28 lines
650 B
PHP

<?php
namespace Tests\Feature;
use Tests\FeatureTestCase;
use App\Jobs\ExportAccountAsSQL;
use Illuminate\Support\Facades\Storage;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ExportAccountAsSQLTest extends FeatureTestCase
{
use DatabaseTransactions;
public function test_it_exports_account_file()
{
Storage::fake();
Storage::fake('local');
$user = $this->signIn();
$path = ExportAccountAsSQL::dispatchSync();
$this->assertStringStartsWith('exports/', $path);
$this->assertStringEndsWith('.sql', $path);
Storage::disk('public')->assertExists($path);
}
}