Separated laravel app to its own folder (#540)
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use Tests\Helpers\FormSubmissionDataFactory;
|
||||
|
||||
it('can validate Update Workspace Select Option Job', function () {
|
||||
$user = $this->actingAsUser();
|
||||
$workspace = $this->createUserWorkspace($user);
|
||||
$form = $this->createForm($user, $workspace);
|
||||
$formData = FormSubmissionDataFactory::generateSubmissionData($form);
|
||||
|
||||
$this->postJson(route('forms.answer', $form->slug), $formData)
|
||||
->assertSuccessful()
|
||||
->assertJson([
|
||||
'type' => 'success',
|
||||
'message' => 'Form submission saved.',
|
||||
]);
|
||||
|
||||
$formData = FormSubmissionDataFactory::generateSubmissionData($form);
|
||||
$this->postJson(route('forms.answer', $form->slug), $formData)
|
||||
->assertSuccessful()
|
||||
->assertJson([
|
||||
'type' => 'success',
|
||||
'message' => 'Form submission saved.',
|
||||
]);
|
||||
});
|
||||
|
||||
it('can validate scope with active subscription', function () {
|
||||
$this->createProUser();
|
||||
$this->createUser();
|
||||
$this->createProUser();
|
||||
$this->createProUser();
|
||||
$this->createUser();
|
||||
|
||||
expect(User::WithActiveSubscription()->count())->toBe(3);
|
||||
});
|
||||
Reference in New Issue
Block a user