X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ddb7f33868ea499ab8f48a7062f145e8c0fbe02f..refs/pull/2700/head:/tests/Auth/UserInviteTest.php diff --git a/tests/Auth/UserInviteTest.php b/tests/Auth/UserInviteTest.php index d200134a5..b6f521eaa 100644 --- a/tests/Auth/UserInviteTest.php +++ b/tests/Auth/UserInviteTest.php @@ -1,4 +1,4 @@ -getAdmin(); - $this->actingAs($admin)->post('/settings/users/create', [ + $email = Str::random(16) . '@example.com'; + $resp = $this->actingAs($admin)->post('/settings/users/create', [ 'name' => 'Barry', - 'email' => 'tester@example.com', + 'email' => $email, 'send_invite' => 'true', ]); + $resp->assertRedirect('/settings/users'); - $newUser = User::query()->where('email', '=', 'tester@example.com')->orderBy('id', 'desc')->first(); + $newUser = User::query()->where('email', '=', $email)->orderBy('id', 'desc')->first(); Notification::assertSentTo($newUser, UserInvite::class); $this->assertDatabaseHas('user_invites', [