mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-07-07 14:52:01 +00:00
630fc08459
- ✨ Introduced support for a Nostr Community Group with relay-based chat and events (NIP-29 standard). - 🌐 Added integration with `group.einundzwanzig.space`, accessible via Flotilla or Nostr clients. - 📋 Implemented "Copy Community Relay URL" functionality. - ✅ Updated tests to validate access for active, paid members.
55 lines
1.9 KiB
PHP
55 lines
1.9 KiB
PHP
<?php
|
|
|
|
use App\Models\EinundzwanzigPleb;
|
|
use App\Support\NostrAuth;
|
|
use Livewire\Livewire;
|
|
|
|
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')
|
|
->assertSee('5 GB Speicher')
|
|
->assertSee('max. 1 GB pro Datei')
|
|
->assertDontSee('https://blossom.einundzwanzig.space');
|
|
});
|
|
|
|
it('unlocks the blossom server for active paid members', function () {
|
|
$pleb = EinundzwanzigPleb::factory()->active()->withPaidCurrentYear()->create();
|
|
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 = EinundzwanzigPleb::factory()->active()->withPaidCurrentYear()->create();
|
|
NostrAuth::login($pleb->pubkey);
|
|
|
|
Livewire::test('association.benefits')
|
|
->call('copyBlossomUrl')
|
|
->assertHasNoErrors();
|
|
});
|
|
|
|
it('unlocks the nostr community group for active paid members', function () {
|
|
$pleb = EinundzwanzigPleb::factory()->active()->withPaidCurrentYear()->create();
|
|
NostrAuth::login($pleb->pubkey);
|
|
|
|
Livewire::test('association.benefits')
|
|
->assertSee('Nostr Community-Gruppe')
|
|
->assertSee('app.flotilla.social/spaces/group.einundzwanzig.space')
|
|
->assertSee('wss://group.einundzwanzig.space');
|
|
});
|
|
|
|
it('copies the community relay url for active members', function () {
|
|
$pleb = EinundzwanzigPleb::factory()->active()->withPaidCurrentYear()->create();
|
|
NostrAuth::login($pleb->pubkey);
|
|
|
|
Livewire::test('association.benefits')
|
|
->call('copyGroupRelayUrl')
|
|
->assertHasNoErrors();
|
|
});
|