mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 02:50:39 +00:00
Limitation API skelet with can upload tests
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
namespace Tests\App\Limitations;
|
||||
|
||||
use Tests\TestCase;
|
||||
use App\Users\Models\User;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class MeteredBillingLimitationTest extends TestCase
|
||||
{
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
DB::table('settings')->insert([
|
||||
'name' => 'subscription_type',
|
||||
'value' => 'metered',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function it_can_upload()
|
||||
{
|
||||
$user = User::factory()
|
||||
->hasFailedpayments(2)
|
||||
->create();
|
||||
|
||||
$this->assertEquals(true, $user->canUpload());
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function it_cant_upload_because_user_has_3_failed_payments()
|
||||
{
|
||||
$user = User::factory()
|
||||
->hasFailedpayments(3)
|
||||
->create();
|
||||
|
||||
$this->assertEquals(false, $user->canUpload());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user