X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/c9c4dbcb5b30e5e39961ceeb031c18ddfaa165e5..refs/pull/5721/head:/tests/Settings/FooterLinksTest.php diff --git a/tests/Settings/FooterLinksTest.php b/tests/Settings/FooterLinksTest.php index f1b5d4294..f0bf65e77 100644 --- a/tests/Settings/FooterLinksTest.php +++ b/tests/Settings/FooterLinksTest.php @@ -8,13 +8,13 @@ class FooterLinksTest extends TestCase { public function test_saving_setting() { - $resp = $this->asAdmin()->post('/settings', [ + $resp = $this->asAdmin()->post('/settings/customization', [ 'setting-app-footer-links' => [ ['label' => 'My custom link 1', 'url' => 'https://example.com/1'], ['label' => 'My custom link 2', 'url' => 'https://example.com/2'], ], ]); - $resp->assertRedirect('/settings'); + $resp->assertRedirect('/settings/customization'); $result = setting('app-footer-links'); $this->assertIsArray($result); @@ -30,7 +30,7 @@ class FooterLinksTest extends TestCase ['label' => 'Another Link', 'url' => 'https://example.com/link-b'], ]]); - $resp = $this->asAdmin()->get('/settings'); + $resp = $this->asAdmin()->get('/settings/customization'); $resp->assertSee('value="My custom link"', false); $resp->assertSee('value="Another Link"', false); $resp->assertSee('value="https://example.com/link-a"', false); @@ -44,8 +44,11 @@ class FooterLinksTest extends TestCase ['label' => 'Another Link', 'url' => 'https://example.com/link-b'], ]]); - $this->get('/login')->assertElementContains('footer a[href="https://example.com/link-a"]', 'My custom link'); - $this->asEditor()->get('/')->assertElementContains('footer a[href="https://example.com/link-b"]', 'Another link'); + $resp = $this->get('/login'); + $this->withHtml($resp)->assertElementContains('footer a[href="https://example.com/link-a"]', 'My custom link'); + + $resp = $this->asEditor()->get('/'); + $this->withHtml($resp)->assertElementContains('footer a[href="https://example.com/link-b"]', 'Another link'); } public function test_using_translation_system_for_labels() @@ -56,7 +59,7 @@ class FooterLinksTest extends TestCase ]]); $resp = $this->get('/login'); - $resp->assertElementContains('footer a[href="https://example.com/privacy"]', 'Privacy Policy'); - $resp->assertElementContains('footer a[href="https://example.com/terms"]', 'Terms of Service'); + $this->withHtml($resp)->assertElementContains('footer a[href="https://example.com/privacy"]', 'Privacy Policy'); + $this->withHtml($resp)->assertElementContains('footer a[href="https://example.com/terms"]', 'Terms of Service'); } }