Customer export test fails when the apps create a customer in their test data.
This commit is contained in:
parent
1fc3991848
commit
e715551491
@ -122,8 +122,8 @@ class CustomersTest extends FeatureTestCase
|
|||||||
|
|
||||||
public function testItShouldExportCustomers()
|
public function testItShouldExportCustomers()
|
||||||
{
|
{
|
||||||
$count = 5;
|
Contact::factory()->customer()->count(5)->create();
|
||||||
Contact::factory()->customer()->count($count)->create();
|
$count = Contact::count();
|
||||||
|
|
||||||
\Excel::fake();
|
\Excel::fake();
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ class CustomersTest extends FeatureTestCase
|
|||||||
\Str::filename(trans_choice('general.customers', 2)) . '.xlsx',
|
\Str::filename(trans_choice('general.customers', 2)) . '.xlsx',
|
||||||
function (Export $export) use ($count) {
|
function (Export $export) use ($count) {
|
||||||
// Assert that the correct export is downloaded.
|
// Assert that the correct export is downloaded.
|
||||||
return $export->collection()->count() === $count + 1;
|
return $export->collection()->count() === $count;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user