+ }
+
+ public function testUserPasswordUpdate()
+ {
+ $user = \BookStack\User::all()->last();
+ $userProfilePage = '/users/' . $user->id;
+ $this->asAdmin()
+ ->visit($userProfilePage)
+ ->type('newpassword', '#password')
+ ->press('Save')
+ ->seePageIs($userProfilePage)
+ ->see('Password confirmation required')
+
+ ->type('newpassword', '#password')
+ ->type('newpassword', '#password-confirm')
+ ->press('Save')
+ ->seePageIs('/users');
+
+ $userPassword = \BookStack\User::find($user->id)->password;
+ $this->assertTrue(Hash::check('newpassword', $userPassword));
+ }
+
+ public function testUserDeletion()
+ {
+ $userDetails = factory(\BookStack\User::class)->make();
+ $user = $this->getNewUser($userDetails->toArray());