Expand profile gender options and cover country plus activity persistence.
Allow the broader gender enum and add tests for country saves and discovery event recording.
This commit is contained in:
@@ -30,6 +30,25 @@ it('stores a selected country on the personal settings endpoint', function (): v
|
||||
|
||||
expect($user->country_id)->toBe($country->id);
|
||||
expect(optional($user->profile)->country_code)->toBe('SI');
|
||||
expect(optional($user->profile)->gender)->toBe('M');
|
||||
});
|
||||
|
||||
it('stores prefer-not-to-say gender as X on the personal settings endpoint', function (): void {
|
||||
$this->withoutMiddleware(ForumBotProtectionMiddleware::class);
|
||||
|
||||
$user = User::factory()->create();
|
||||
|
||||
$response = $this->actingAs($user)->postJson('/settings/personal/update', [
|
||||
'birthday' => '1991-05-10',
|
||||
'gender' => 'x',
|
||||
]);
|
||||
|
||||
$response->assertOk();
|
||||
|
||||
$user->refresh();
|
||||
|
||||
expect(optional($user->profile)->gender)->toBe('X');
|
||||
expect(optional($user->profile)->birthdate?->toDateString())->toBe('1991-05-10');
|
||||
});
|
||||
|
||||
it('rejects invalid country identifiers on the personal settings endpoint', function (): void {
|
||||
|
||||
Reference in New Issue
Block a user