]> BookStack Code Mirror - bookstack/blobdiff - tests/TestEmailTest.php
Added 'Sort Book' action to chapters
[bookstack] / tests / TestEmailTest.php
index 0a2091fe3e92bc0dd018acc216087b107e37e7a1..97f98225d4fe8b82920a2eb4b5d1cfc14f17c9fe 100644 (file)
@@ -12,8 +12,8 @@ class TestEmailTest extends TestCase
     {
         $pageView = $this->asAdmin()->get('/settings/maintenance');
         $formCssSelector = 'form[action$="/settings/maintenance/send-test-email"]';
-        $pageView->assertElementExists($formCssSelector);
-        $pageView->assertElementContains($formCssSelector . ' button', 'Send Test Email');
+        $this->withHtml($pageView)->assertElementExists($formCssSelector);
+        $this->withHtml($pageView)->assertElementContains($formCssSelector . ' button', 'Send Test Email');
     }
 
     public function test_send_test_email_endpoint_sends_email_and_redirects_user_and_shows_notification()
@@ -34,7 +34,7 @@ class TestEmailTest extends TestCase
         $this->app[Dispatcher::class] = $mockDispatcher;
 
         $exception = new \Exception('A random error occurred when testing an email');
-        $mockDispatcher->shouldReceive('send')->andThrow($exception);
+        $mockDispatcher->shouldReceive('sendNow')->andThrow($exception);
 
         $admin = $this->getAdmin();
         $sendReq = $this->actingAs($admin)->post('/settings/maintenance/send-test-email');