mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Simplify test
This commit is contained in:
parent
fc88b2487f
commit
7e9c564d0b
|
@ -82,28 +82,9 @@ class AssetAcceptanceReminderTest extends TestCase
|
|||
Mail::assertNotSent(CheckoutAssetMail::class);
|
||||
}
|
||||
|
||||
public static function acceptances()
|
||||
public function testReminderIsSentToUser()
|
||||
{
|
||||
yield 'User with locale set' => [
|
||||
function () {
|
||||
return CheckoutAcceptance::factory()->pending()->create();
|
||||
}
|
||||
];
|
||||
|
||||
yield 'User without locale set' => [
|
||||
function () {
|
||||
$checkoutAcceptance = CheckoutAcceptance::factory()->pending()->create();
|
||||
$checkoutAcceptance->assignedTo->update(['locale' => null]);
|
||||
|
||||
return $checkoutAcceptance;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
#[DataProvider('acceptances')]
|
||||
public function testReminderIsSentToUser($callback)
|
||||
{
|
||||
$checkoutAcceptance = $callback();
|
||||
$checkoutAcceptance = CheckoutAcceptance::factory()->pending()->create();
|
||||
|
||||
$this->actingAs(User::factory()->canViewReports()->create())
|
||||
->post($this->routeFor($checkoutAcceptance))
|
||||
|
|
Loading…
Reference in a new issue