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

Updated tests to use ssddanbrown/asserthtml package

Closes #3519
This commit is contained in:
Dan Brown
2022-07-23 15:10:18 +01:00
parent cf73e5f2c6
commit 72c8b138e1
48 changed files with 869 additions and 1014 deletions

View File

@@ -6,9 +6,9 @@ use BookStack\Auth\Access\Ldap;
use BookStack\Auth\Access\LdapService;
use BookStack\Auth\Role;
use BookStack\Auth\User;
use Illuminate\Testing\TestResponse;
use Mockery\MockInterface;
use Tests\TestCase;
use Tests\TestResponse;
class LdapTest extends TestCase
{
@@ -106,7 +106,7 @@ class LdapTest extends TestCase
$resp->assertSee($this->mockUser->name);
$resp = $this->followingRedirects()->mockUserLogin($this->mockUser->email);
$resp->assertElementExists('#home-default');
$this->withHtml($resp)->assertElementExists('#home-default');
$resp->assertSee($this->mockUser->name);
$this->assertDatabaseHas('users', [
'email' => $this->mockUser->email,
@@ -251,7 +251,8 @@ class LdapTest extends TestCase
public function test_registration_disabled()
{
$this->followingRedirects()->get('/register')->assertElementContains('#content', 'Log In');
$resp = $this->followingRedirects()->get('/register');
$this->withHtml($resp)->assertElementContains('#content', 'Log In');
}
public function test_non_admins_cannot_change_auth_id()