1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #6302 from turbo124/v5-develop

Fixes for account creation
This commit is contained in:
David Bomba 2021-07-21 09:13:47 +10:00 committed by GitHub
commit 6c2db0c853
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 6 deletions

View File

@ -79,12 +79,14 @@ class CreateAccount
if(Ninja::isHosted()) if(Ninja::isHosted())
{ {
$sp794f3f->trial_started = now(); $sp794f3f->trial_started = now();
$sp794f3f->trial_plan = 'pro'; $sp794f3f->trial_plan = 'pro';
// $sp794f3f->plan = 'pro';
$sp794f3f->save();
} }
$sp794f3f->save();
$sp035a66 = CreateCompany::dispatchNow($this->request, $sp794f3f); $sp035a66 = CreateCompany::dispatchNow($this->request, $sp794f3f);
$sp035a66->load('account'); $sp035a66->load('account');
$sp794f3f->default_company_id = $sp035a66->id; $sp794f3f->default_company_id = $sp035a66->id;

View File

@ -14,8 +14,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true), 'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => '5.2.13', 'app_version' => '5.2.14',
'app_tag' => '5.2.13', 'app_tag' => '5.2.14',
'minimum_client_version' => '5.0.16', 'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1', 'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''), 'api_secret' => env('API_SECRET', ''),

View File

@ -12,6 +12,8 @@
namespace Tests\Feature\ClientPortal; namespace Tests\Feature\ClientPortal;
use App\DataMapper\ClientSettings;
use App\DataMapper\CompanySettings;
use App\Http\Livewire\CreditsTable; use App\Http\Livewire\CreditsTable;
use App\Models\Account; use App\Models\Account;
use App\Models\Client; use App\Models\Client;
@ -19,6 +21,7 @@ use App\Models\ClientContact;
use App\Models\Company; use App\Models\Company;
use App\Models\Credit; use App\Models\Credit;
use App\Models\User; use App\Models\User;
use App\Utils\Traits\AppSetup;
use Faker\Factory; use Faker\Factory;
use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Foundation\Testing\DatabaseTransactions;
use Livewire\Livewire; use Livewire\Livewire;
@ -28,12 +31,14 @@ use function now;
class CreditsTest extends TestCase class CreditsTest extends TestCase
{ {
use DatabaseTransactions; use DatabaseTransactions;
use AppSetup;
public function setUp(): void public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->faker = Factory::create(); $this->faker = Factory::create();
$this->buildCache(true);
} }
public function testShowingOnlyCreditsWithDueDateLessOrEqualToNow() public function testShowingOnlyCreditsWithDueDateLessOrEqualToNow()
@ -45,8 +50,12 @@ class CreditsTest extends TestCase
); );
$company = Company::factory()->create(['account_id' => $account->id]); $company = Company::factory()->create(['account_id' => $account->id]);
$company->settings = CompanySettings::defaults();
$company->save();
$client = Client::factory()->create(['company_id' => $company->id, 'user_id' => $user->id]); $client = Client::factory()->create(['company_id' => $company->id, 'user_id' => $user->id]);
$client->settings = ClientSettings::defaults();
$client->save();
ClientContact::factory()->count(2)->create([ ClientContact::factory()->count(2)->create([
'user_id' => $user->id, 'user_id' => $user->id,

View File

@ -20,6 +20,7 @@ use App\Models\ClientContact;
use App\Models\Company; use App\Models\Company;
use App\Models\Invoice; use App\Models\Invoice;
use App\Models\User; use App\Models\User;
use App\Utils\Traits\AppSetup;
use Faker\Factory; use Faker\Factory;
use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Foundation\Testing\DatabaseTransactions;
use Livewire\Livewire; use Livewire\Livewire;
@ -28,12 +29,15 @@ use Tests\TestCase;
class InvoicesTest extends TestCase class InvoicesTest extends TestCase
{ {
use DatabaseTransactions; use DatabaseTransactions;
use AppSetup;
public function setUp(): void public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->faker = Factory::create(); $this->faker = Factory::create();
$this->buildCache(true);
} }
public function testInvoiceTableFilters() public function testInvoiceTableFilters()