Compare commits

..

No commits in common. "71da52791d048d3fc345bdbfcc87bcb540f35fca" and "b28525be7c14b2234a00b836c85ace0a920c20b7" have entirely different histories.

2 changed files with 21 additions and 2 deletions

View File

@ -177,6 +177,20 @@ class IndexTest extends TestCase
], $response, 'data.data.0.memberships.0'); ], $response, 'data.data.0.memberships.0');
} }
public function testItDoesntShowEndedMemberships(): void
{
$this->withoutExceptionHandling()->login()->loginNami();
$group = Group::factory()->create();
$member = Member::factory()
->defaults()
->has(Membership::factory()->for($group)->in('€ Mitglied', 122, 'Wölfling', 234)->ended())
->create();
$response = $this->get('/member');
$this->assertCount(0, $this->inertia($response, 'data.data.0.memberships'));
}
public function testItReturnsPayments(): void public function testItReturnsPayments(): void
{ {
$this->withoutExceptionHandling()->login()->loginNami(); $this->withoutExceptionHandling()->login()->loginNami();

View File

@ -23,10 +23,15 @@ class ShowTest extends TestCase
{ {
use DatabaseTransactions; use DatabaseTransactions;
public function setUp(): void
{
parent::setUp();
Carbon::setTestNow(Carbon::parse('2006-01-01 15:00:00'));
}
public function testItShowsSingleMember(): void public function testItShowsSingleMember(): void
{ {
Carbon::setTestNow(Carbon::parse('2006-01-01 15:00:00'));
$this->withoutExceptionHandling()->login()->loginNami(); $this->withoutExceptionHandling()->login()->loginNami();
$member = Member::factory() $member = Member::factory()
->defaults() ->defaults()