@@ -107,18 +107,18 @@ public function test_book_html_export()
107107 $ resp ->assertHeader ('Content-Disposition ' , 'attachment; filename=" ' . $ book ->slug . '.html" ' );
108108 }
109109
110- public function test_book_html_export_shows_chapter_descriptions ()
110+ public function test_book_html_export_shows_html_descriptions ()
111111 {
112- $ chapterDesc = 'My custom test chapter description ' . Str::random (12 );
113- $ chapter = $ this ->entities ->chapter ();
114- $ chapter ->description = $ chapterDesc ;
112+ $ book = $ this ->entities ->bookHasChaptersAndPages ();
113+ $ chapter = $ book ->chapters ()->first ();
114+ $ book ->description_html = '<p>A description with <strong>HTML</strong> within!</p> ' ;
115+ $ chapter ->description_html = '<p>A chapter description with <strong>HTML</strong> within!</p> ' ;
116+ $ book ->save ();
115117 $ chapter ->save ();
116118
117- $ book = $ chapter ->book ;
118- $ this ->asEditor ();
119-
120- $ resp = $ this ->get ($ book ->getUrl ('/export/html ' ));
121- $ resp ->assertSee ($ chapterDesc );
119+ $ resp = $ this ->asEditor ()->get ($ book ->getUrl ('/export/html ' ));
120+ $ resp ->assertSee ($ book ->description_html , false );
121+ $ resp ->assertSee ($ chapter ->description_html , false );
122122 }
123123
124124 public function test_chapter_text_export ()
@@ -174,6 +174,16 @@ public function test_chapter_html_export()
174174 $ resp ->assertHeader ('Content-Disposition ' , 'attachment; filename=" ' . $ chapter ->slug . '.html" ' );
175175 }
176176
177+ public function test_chapter_html_export_shows_html_descriptions ()
178+ {
179+ $ chapter = $ this ->entities ->chapter ();
180+ $ chapter ->description_html = '<p>A description with <strong>HTML</strong> within!</p> ' ;
181+ $ chapter ->save ();
182+
183+ $ resp = $ this ->asEditor ()->get ($ chapter ->getUrl ('/export/html ' ));
184+ $ resp ->assertSee ($ chapter ->description_html , false );
185+ }
186+
177187 public function test_page_html_export_contains_custom_head_if_set ()
178188 {
179189 $ page = $ this ->entities ->page ();
0 commit comments