mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-06-22 22:50:24 +00:00
🛠️ Update dependencies in composer.lock to latest versions
- Upgraded multiple packages, including `brick/math`, `guzzlehttp/guzzle`, `laravel/framework`, `spatie/image`, and more. - Ensured compatibility with project requirements by verifying dependency interrelations.
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use App\Models\EinundzwanzigPleb;
|
||||
use App\Support\NostrAuth;
|
||||
use Livewire\Livewire;
|
||||
|
||||
function activePaidPleb(): EinundzwanzigPleb
|
||||
{
|
||||
$pleb = EinundzwanzigPleb::factory()->active()->create();
|
||||
|
||||
$pleb->paymentEvents()->create([
|
||||
'year' => date('Y'),
|
||||
'amount' => 21000,
|
||||
'event_id' => 'event-benefits',
|
||||
'paid' => true,
|
||||
]);
|
||||
|
||||
return $pleb;
|
||||
}
|
||||
|
||||
it('shows the locked state with all four services for guests', function () {
|
||||
Livewire::test('association.benefits')
|
||||
->assertSet('currentYearIsPaid', false)
|
||||
->assertSee('Dienste gesperrt')
|
||||
->assertSee('Blossom-Medienserver')
|
||||
->assertDontSee('https://blossom.einundzwanzig.space');
|
||||
});
|
||||
|
||||
it('unlocks the blossom server for active paid members', function () {
|
||||
$pleb = activePaidPleb();
|
||||
NostrAuth::login($pleb->pubkey);
|
||||
|
||||
Livewire::test('association.benefits')
|
||||
->assertSet('currentYearIsPaid', true)
|
||||
->assertSee('Mitgliedschaft aktiv')
|
||||
->assertSee('Blossom Medienserver')
|
||||
->assertSee('https://blossom.einundzwanzig.space');
|
||||
});
|
||||
|
||||
it('copies the blossom url for active members', function () {
|
||||
$pleb = activePaidPleb();
|
||||
NostrAuth::login($pleb->pubkey);
|
||||
|
||||
Livewire::test('association.benefits')
|
||||
->call('copyBlossomUrl')
|
||||
->assertHasNoErrors();
|
||||
});
|
||||
@@ -12,6 +12,15 @@ it('rejects non-string values for the fax field', function () {
|
||||
->assertStatus(422);
|
||||
});
|
||||
|
||||
it('lists all member benefits including blossom for guests with a link to the benefits page', function () {
|
||||
Livewire::test('association.profile')
|
||||
->assertSee('Nostr Relay')
|
||||
->assertSee('NIP-05 Verifizierung')
|
||||
->assertSee('Lightning Watchtower')
|
||||
->assertSee('Blossom Medienserver')
|
||||
->assertSeeHtml(route('association.benefits'));
|
||||
});
|
||||
|
||||
it('rejects non-string values for the email field', function () {
|
||||
Livewire::test('association.profile')
|
||||
->set('profileForm.email', [])
|
||||
|
||||
Reference in New Issue
Block a user