Separated laravel app to its own folder (#540)

This commit is contained in:
Julien Nahum
2024-08-26 18:24:56 +02:00
committed by GitHub
parent 39b8df5eed
commit 5bd1dda504
546 changed files with 124 additions and 143 deletions

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Support\Str;
it('can hide branding on upgrade', function () {
$user = $this->actingAsUser();
// Create workspaces and forms
for ($i = 0; $i < 3; $i++) {
$workspace = $this->createUserWorkspace($user);
for ($j = 0; $j < 3; $j++) {
$this->createForm($user, $workspace);
}
}
// Forms don't have branding removed when created
$forms = $user->workspaces()->with('forms')->get()->pluck('forms')->flatten();
$forms->each(function ($form) {
$this->assertEquals($form->no_branding, false);
});
// User subscribes
$user->subscriptions()->create([
'type' => 'default',
'stripe_id' => Str::random(),
'stripe_status' => 'active',
'stripe_price' => Str::random(),
'quantity' => 1,
]);
// Forms have branding removed after subscription
$forms = $user->workspaces()->with('forms')->get()->pluck('forms')->flatten();
$forms->each(function ($form) {
$this->assertEquals($form->no_branding, true);
});
});