namespace Tests\Auth;
-use BookStack\Auth\Access\UserInviteService;
-use BookStack\Auth\User;
+use BookStack\Access\UserInviteService;
use BookStack\Notifications\UserInvite;
+use BookStack\Users\Models\User;
use Carbon\Carbon;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Support\Facades\DB;
public function test_user_creation_creates_invite()
{
Notification::fake();
- $admin = $this->getAdmin();
+ $admin = $this->users->admin();
$email = Str::random(16) . '@example.com';
$resp = $this->actingAs($admin)->post('/settings/users/create', [
public function test_user_invite_sent_in_selected_language()
{
Notification::fake();
- $admin = $this->getAdmin();
+ $admin = $this->users->admin();
$email = Str::random(16) . '@example.com';
$resp = $this->actingAs($admin)->post('/settings/users/create', [
/** @var MailMessage $mail */
$mail = $notification->toMail($notifiable);
- return 'Du wurdest eingeladen BookStack beizutreten!' === $mail->subject &&
+ return 'Sie wurden eingeladen, BookStack beizutreten!' === $mail->subject &&
'Ein Konto wurde für Sie auf BookStack erstellt.' === $mail->greeting;
});
}
public function test_invite_set_password()
{
Notification::fake();
- $user = $this->getViewer();
+ $user = $this->users->viewer();
$inviteService = app(UserInviteService::class);
$inviteService->sendInvitation($user);
public function test_invite_set_has_password_validation()
{
Notification::fake();
- $user = $this->getViewer();
+ $user = $this->users->viewer();
$inviteService = app(UserInviteService::class);
$inviteService->sendInvitation($user);
public function test_token_expires_after_two_weeks()
{
Notification::fake();
- $user = $this->getViewer();
+ $user = $this->users->viewer();
$inviteService = app(UserInviteService::class);
$inviteService->sendInvitation($user);