Merge pull request #2019 from burakcakirel/customer-export-test
Customer export test fails when the apps create a customer in their t…
This commit is contained in:
commit
b33dd23141
@ -122,8 +122,8 @@ class CustomersTest extends FeatureTestCase
|
||||
|
||||
public function testItShouldExportCustomers()
|
||||
{
|
||||
$count = 5;
|
||||
Contact::factory()->customer()->count($count)->create();
|
||||
Contact::factory()->customer()->count(5)->create();
|
||||
$count = Contact::count();
|
||||
|
||||
\Excel::fake();
|
||||
|
||||
@ -135,7 +135,7 @@ class CustomersTest extends FeatureTestCase
|
||||
\Str::filename(trans_choice('general.customers', 2)) . '.xlsx',
|
||||
function (Export $export) use ($count) {
|
||||
// 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