mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
added it_store_stripe_plans_via_setup_wizard test
This commit is contained in:
@@ -14,6 +14,14 @@ class SetupWizardTest extends TestCase
|
||||
{
|
||||
use DatabaseMigrations;
|
||||
|
||||
/**
|
||||
* CAVEAT:
|
||||
*
|
||||
* The route '/api/setup/stripe-plans' which is part of setup wizard is moved to
|
||||
* SubscriptionTest.php to group all live API test. For more info how to test
|
||||
* subscription integration in VueFileManager platform visit https://laravel.com/docs/8.x/billing#testing
|
||||
*/
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Tests\Feature;
|
||||
use App\Models\User;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Illuminate\Support\Str;
|
||||
use Laravel\Sanctum\Sanctum;
|
||||
use Tests\TestCase;
|
||||
|
||||
@@ -293,4 +294,33 @@ class SubscriptionTest extends TestCase
|
||||
'customer' => $this->user['stripe_id']
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function it_store_stripe_plans_via_setup_wizard()
|
||||
{
|
||||
$this->postJson('/api/setup/stripe-plans', [
|
||||
'plans' => [
|
||||
[
|
||||
'type' => 'plan',
|
||||
'attributes' => [
|
||||
'name' => 'test-plan-' . Str::random(16),
|
||||
'price' => (string) rand(1, 99),
|
||||
'description' => 'Some random description',
|
||||
'capacity' => rand(1, 999),
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'plan',
|
||||
'attributes' => [
|
||||
'name' => 'test-plan-' . Str::random(16),
|
||||
'price' => (string) rand(1, 99),
|
||||
'description' => 'Some random description',
|
||||
'capacity' => rand(1, 999),
|
||||
],
|
||||
],
|
||||
]
|
||||
])->assertStatus(204);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user