]> BookStack Code Mirror - bookstack/blobdiff - tests/Auth/AuthTest.php
replace GPL diff lib with MIT lib
[bookstack] / tests / Auth / AuthTest.php
index 69402266684522b2cb0b882f66dfef04df77bd8d..306771ed5a98883b4fb87b2242ecd90709a054fc 100644 (file)
@@ -133,12 +133,12 @@ class AuthTest extends TestCase
             ->click('Add new user')
             ->type($user->name, '#name')
             ->type($user->email, '#email')
-            ->select(2, '#role')
+            ->check('roles[admin]')
             ->type($user->password, '#password')
             ->type($user->password, '#password-confirm')
             ->press('Save')
-            ->seeInDatabase('users', $user->toArray())
             ->seePageIs('/settings/users')
+            ->seeInDatabase('users', $user->toArray())
             ->see($user->name);
     }
 
@@ -181,7 +181,7 @@ class AuthTest extends TestCase
     public function test_user_deletion()
     {
         $userDetails = factory(\BookStack\User::class)->make();
-        $user = $this->getNewUser($userDetails->toArray());
+        $user = $this->getEditor($userDetails->toArray());
 
         $this->asAdmin()
             ->visit('/settings/users/' . $user->id)