Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Stories/RateLimitTest.php
Show All 13 Lines | |||||
class RateLimitTest extends TestCase | class RateLimitTest extends TestCase | ||||
{ | { | ||||
public function setUp(): void | public function setUp(): void | ||||
{ | { | ||||
parent::setUp(); | parent::setUp(); | ||||
$this->setUpTest(); | $this->setUpTest(); | ||||
$this->useServicesUrl(); | $this->useServicesUrl(); | ||||
\App\Payment::query()->delete(); | |||||
} | } | ||||
public function tearDown(): void | public function tearDown(): void | ||||
{ | { | ||||
\App\Payment::query()->delete(); | |||||
parent::tearDown(); | parent::tearDown(); | ||||
} | } | ||||
/** | /** | ||||
* Verify an individual can send an email unrestricted, so long as the account is active. | * Verify an individual can send an email unrestricted, so long as the account is active. | ||||
*/ | */ | ||||
public function testIndividualDunno() | public function testIndividualDunno() | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | public function testIndividualPaidMessages() | ||||
$payment = [ | $payment = [ | ||||
'id' => \App\Utils::uuidInt(), | 'id' => \App\Utils::uuidInt(), | ||||
'status' => \App\Providers\PaymentProvider::STATUS_PAID, | 'status' => \App\Providers\PaymentProvider::STATUS_PAID, | ||||
'type' => \App\Providers\PaymentProvider::TYPE_ONEOFF, | 'type' => \App\Providers\PaymentProvider::TYPE_ONEOFF, | ||||
'description' => 'Paid in March', | 'description' => 'Paid in March', | ||||
'wallet_id' => $wallet->id, | 'wallet_id' => $wallet->id, | ||||
'provider' => 'stripe', | 'provider' => 'stripe', | ||||
'amount' => 1111, | 'amount' => 1111, | ||||
'credit_amount' => 1111, | |||||
'currency_amount' => 1111, | 'currency_amount' => 1111, | ||||
'currency' => 'CHF', | 'currency' => 'CHF', | ||||
]; | ]; | ||||
\App\Payment::create($payment); | \App\Payment::create($payment); | ||||
$wallet->credit(1111); | $wallet->credit(1111); | ||||
$request = [ | $request = [ | ||||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | public function testIndividualPaidRecipients() | ||||
$payment = [ | $payment = [ | ||||
'id' => \App\Utils::uuidInt(), | 'id' => \App\Utils::uuidInt(), | ||||
'status' => \App\Providers\PaymentProvider::STATUS_PAID, | 'status' => \App\Providers\PaymentProvider::STATUS_PAID, | ||||
'type' => \App\Providers\PaymentProvider::TYPE_ONEOFF, | 'type' => \App\Providers\PaymentProvider::TYPE_ONEOFF, | ||||
'description' => 'Paid in March', | 'description' => 'Paid in March', | ||||
'wallet_id' => $wallet->id, | 'wallet_id' => $wallet->id, | ||||
'provider' => 'stripe', | 'provider' => 'stripe', | ||||
'amount' => 1111, | 'amount' => 1111, | ||||
'credit_amount' => 1111, | |||||
'currency_amount' => 1111, | 'currency_amount' => 1111, | ||||
'currency' => 'CHF', | 'currency' => 'CHF', | ||||
]; | ]; | ||||
\App\Payment::create($payment); | \App\Payment::create($payment); | ||||
$wallet->credit(1111); | $wallet->credit(1111); | ||||
$request = [ | $request = [ | ||||
▲ Show 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | public function testGroupPaidOwnerRecipients() | ||||
$payment = [ | $payment = [ | ||||
'id' => \App\Utils::uuidInt(), | 'id' => \App\Utils::uuidInt(), | ||||
'status' => \App\Providers\PaymentProvider::STATUS_PAID, | 'status' => \App\Providers\PaymentProvider::STATUS_PAID, | ||||
'type' => \App\Providers\PaymentProvider::TYPE_ONEOFF, | 'type' => \App\Providers\PaymentProvider::TYPE_ONEOFF, | ||||
'description' => 'Paid in March', | 'description' => 'Paid in March', | ||||
'wallet_id' => $wallet->id, | 'wallet_id' => $wallet->id, | ||||
'provider' => 'stripe', | 'provider' => 'stripe', | ||||
'amount' => 1111, | 'amount' => 1111, | ||||
'credit_amount' => 1111, | |||||
'currency_amount' => 1111, | 'currency_amount' => 1111, | ||||
'currency' => 'CHF', | 'currency' => 'CHF', | ||||
]; | ]; | ||||
\App\Payment::create($payment); | \App\Payment::create($payment); | ||||
$wallet->credit(1111); | $wallet->credit(1111); | ||||
$request = [ | $request = [ | ||||
▲ Show 20 Lines • Show All 153 Lines • Show Last 20 Lines |