🔥 **Cleanup:** Removed BookCase and OrangePill models, factories, migrations, and related references. Added tests for new service and meetup creation flows. Updated PHPUnit settings and browser-specific configurations.

This commit is contained in:
BT
2026-05-02 22:00:26 +01:00
parent 63aed880e1
commit 04e3e30fcf
54 changed files with 3440 additions and 298 deletions
@@ -0,0 +1,36 @@
<?php
use App\Jobs\FetchNostrProfileJob;
use App\Models\User;
use Illuminate\Support\Facades\Queue;
it('can be dispatched for a single user', function () {
Queue::fake();
$user = User::factory()->create(['nostr' => 'npub1'.str_repeat('a', 58)]);
FetchNostrProfileJob::dispatch($user);
Queue::assertPushed(
FetchNostrProfileJob::class,
fn (FetchNostrProfileJob $job) => $job->user?->id === $user->id,
);
});
it('can be dispatched without a user (batch mode)', function () {
Queue::fake();
FetchNostrProfileJob::dispatch();
Queue::assertPushed(
FetchNostrProfileJob::class,
fn (FetchNostrProfileJob $job) => $job->user === null,
);
});
it('returns early when the supplied user has no nostr handle', function () {
$user = User::factory()->create(['nostr' => null]);
(new FetchNostrProfileJob($user))->handle();
expect($user->refresh()->name)->not->toBeEmpty();
});