opnform/tests/Unit/TestHelpersTest.php

24 lines
708 B
PHP
Raw Permalink Normal View History

2022-09-20 19:59:52 +00:00
<?php
uses(\Tests\TestCase::class);
it('can create pro user who are subscribed', function () {
$user = $this->actingAsProUser();
expect($user->is_subscribed)->toBeTrue();
});
it('can create test workspace', function () {
$user = $this->actingAsProUser();
$this->createUserWorkspace($user);
expect($user->workspaces()->count())->toBe(1);
});
it('can make a form for a database', function () {
$user = $this->actingAsProUser();
$workspace = $this->createUserWorkspace($user);
2024-02-23 10:54:12 +00:00
$form = $this->makeForm($user, $workspace);
2022-09-20 19:59:52 +00:00
expect($form->title)->not()->toBeNull();
expect($form->description)->not()->toBeNull();
expect(count($form->properties))->not()->toBe(0);
});