X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/078e8e7dc3ee80ac57474a9185bba2b460a740f0..refs/pull/3698/head:/tests/Settings/SettingsTest.php diff --git a/tests/Settings/SettingsTest.php b/tests/Settings/SettingsTest.php index bef354dac..e2ac6f27c 100644 --- a/tests/Settings/SettingsTest.php +++ b/tests/Settings/SettingsTest.php @@ -10,7 +10,11 @@ class SettingsTest extends TestCase { $resp = $this->asAdmin()->get('/settings'); - $resp->assertRedirect('/settings/features'); + $resp->assertStatus(302); + + // Manually check path to ensure it's generated as the full path + $location = $resp->headers->get('location'); + $this->assertEquals(url('/settings/features'), $location); } public function test_settings_category_links_work_as_expected() @@ -24,8 +28,8 @@ class SettingsTest extends TestCase foreach ($categories as $category => $title) { $resp = $this->get("/settings/{$category}"); - $resp->assertElementContains('h1', $title); - $resp->assertElementExists("form[action$=\"/settings/{$category}\"]"); + $this->withHtml($resp)->assertElementContains('h1', $title); + $this->withHtml($resp)->assertElementExists("form[action$=\"/settings/{$category}\"]"); } }