refactor: replace custom CRM with Monica fork
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s

This commit is contained in:
Kroonk
2026-05-22 16:19:55 +02:00
parent 38cc4c09ca
commit a213a1dba0
2215 changed files with 242567 additions and 6015 deletions

View File

@@ -0,0 +1,48 @@
<?php
namespace Tests\Feature;
use Tests\TestCase;
use App\Models\Account\Account;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class InstanceTest extends TestCase
{
use DatabaseTransactions;
/**
* Check if, by default, the disable signups feature is turned off in an
* instance.
*
* @return void
*/
public function test_disable_signup_set_to_false_shows_signup_button()
{
config(['monica.disable_signup' => false]);
factory(Account::class)->create();
$response = $this->get('/');
$response->assertSee(
'Sign up'
);
}
/**
* If an instance sets `disable_signup` env variable to true, it should hide
* the signup button on the Sign in page.
* Also, trying to reach `/register` should lead to a 403 page.
*
* @return void
*/
public function test_disable_signup_set_to_true_hides_signup_button_and_register_page()
{
config(['monica.disable_signup' => true]);
factory(Account::class)->create();
$response = $this->get('/');
$response->assertDontSee(
'Sign up'
);
}
}