added it_store_stripe_plans_via_setup_wizard test

This commit is contained in:
Peter Papp
2021-03-06 11:32:18 +01:00
parent 355b016f22
commit 88540bd2a6
5 changed files with 1908 additions and 1792 deletions
+30
View File
@@ -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);
}
}