mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-07-02 09:10:25 +00:00
🎨 Refactor Livewire views and tests for updated storage benefits on Blossom Media
- Removed unused `copyRelayUrl` and `copyWatchtowerUrl` methods in `Profile` Livewire component. - Updated storage details in `association.profile` and `association.benefits` views with size and file limits. - Enhanced `BenefitsTest` to validate new storage capacity information.
This commit is contained in:
@@ -4,30 +4,18 @@ 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')
|
||||
->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 = activePaidPleb();
|
||||
$pleb = EinundzwanzigPleb::factory()->active()->withPaidCurrentYear()->create();
|
||||
NostrAuth::login($pleb->pubkey);
|
||||
|
||||
Livewire::test('association.benefits')
|
||||
@@ -38,7 +26,7 @@ it('unlocks the blossom server for active paid members', function () {
|
||||
});
|
||||
|
||||
it('copies the blossom url for active members', function () {
|
||||
$pleb = activePaidPleb();
|
||||
$pleb = EinundzwanzigPleb::factory()->active()->withPaidCurrentYear()->create();
|
||||
NostrAuth::login($pleb->pubkey);
|
||||
|
||||
Livewire::test('association.benefits')
|
||||
|
||||
Reference in New Issue
Block a user