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,32 @@
<?php
namespace Tests\Unit\Jobs;
use Carbon\Carbon;
use Tests\TestCase;
use App\Models\Contact\Contact;
use App\Jobs\UpdateLastConsultedDate;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class UpdateLastConsultedDateTest extends TestCase
{
use DatabaseTransactions;
/** @test */
public function it_updates_the_last_consulted_at_field_for_the_given_contact()
{
Carbon::setTestNow(Carbon::create(2017, 1, 1, 7, 0, 0));
$contact = factory(Contact::class)->create([
'number_of_views' => 1,
]);
UpdateLastConsultedDate::dispatch($contact);
$this->assertDatabaseHas('contacts', [
'id' => $contact->id,
'last_consulted_at' => '2017-01-01 07:00:00',
'number_of_views' => 2,
]);
}
}