fixed TransfersTest import step..
This commit is contained in:
@@ -81,8 +81,8 @@ class TransfersTest extends FeatureTestCase
|
|||||||
\Excel::fake();
|
\Excel::fake();
|
||||||
|
|
||||||
$this->loginAs()
|
$this->loginAs()
|
||||||
->get(route('transfers.export'))
|
->get(route('transfers.export'))
|
||||||
->assertStatus(200);
|
->assertStatus(200);
|
||||||
|
|
||||||
\Excel::assertDownloaded(
|
\Excel::assertDownloaded(
|
||||||
\Str::filename(trans_choice('general.transfers', 2)) . '.xlsx',
|
\Str::filename(trans_choice('general.transfers', 2)) . '.xlsx',
|
||||||
@@ -101,10 +101,10 @@ class TransfersTest extends FeatureTestCase
|
|||||||
\Excel::fake();
|
\Excel::fake();
|
||||||
|
|
||||||
$this->loginAs()
|
$this->loginAs()
|
||||||
->post(
|
->post(
|
||||||
route('bulk-actions.action', ['group' => 'banking', 'type' => 'transfers']),
|
route('bulk-actions.action', ['group' => 'banking', 'type' => 'transfers']),
|
||||||
['handle' => 'export', 'selected' => [$transfers->random()->id]]
|
['handle' => 'export', 'selected' => [$transfers->random()->id]]
|
||||||
)
|
)
|
||||||
->assertStatus(200);
|
->assertStatus(200);
|
||||||
|
|
||||||
\Excel::assertDownloaded(
|
\Excel::assertDownloaded(
|
||||||
@@ -120,16 +120,16 @@ class TransfersTest extends FeatureTestCase
|
|||||||
\Excel::fake();
|
\Excel::fake();
|
||||||
|
|
||||||
$this->loginAs()
|
$this->loginAs()
|
||||||
->post(
|
->post(
|
||||||
route('transfers.import'),
|
route('transfers.import'),
|
||||||
[
|
[
|
||||||
'import' => UploadedFile::fake()->createWithContent(
|
'import' => UploadedFile::fake()->createWithContent(
|
||||||
'transfers.xlsx',
|
'transfers.xlsx',
|
||||||
File::get(public_path('files/import/transfers.xlsx'))
|
File::get(public_path('files/import/transfers.xlsx'))
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
->assertStatus(302);
|
->assertStatus(200);
|
||||||
|
|
||||||
\Excel::assertImported('transfers.xlsx');
|
\Excel::assertImported('transfers.xlsx');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user