1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

Added language select to the user create form

- Updated user invite to take language from user.
- Added tests to cover.
- Added page/tab title to user create view.

For #2576 and #2408
This commit is contained in:
Dan Brown
2022-01-31 22:15:21 +00:00
parent f83cc83877
commit 6eadf3efb3
7 changed files with 79 additions and 32 deletions

View File

@ -183,6 +183,16 @@ class UserManagementTest extends TestCase
$resp->assertSee('cannot delete the guest user');
}
public function test_user_create_language_reflects_default_system_locale()
{
$langs = ['en', 'fr', 'hr'];
foreach ($langs as $lang) {
config()->set('app.locale', $lang);
$resp = $this->asAdmin()->get('/settings/users/create');
$resp->assertElementExists('select[name="setting[language]"] option[value="' . $lang . '"][selected]');
}
}
public function test_user_creation_is_not_performed_if_the_invitation_sending_fails()
{
/** @var User $user */