+ public function test_book_text_export_format()
+ {
+ $entities = $this->entities->createChainBelongingToUser($this->users->viewer());
+ $this->entities->updatePage($entities['page'], ['html' => '<p>My great page</p><p>Full of <strong>great</strong> stuff</p>', 'name' => 'My wonderful page!']);
+ $entities['chapter']->name = 'Export chapter';
+ $entities['chapter']->description = "A test chapter to be exported\nIt has loads of info within";
+ $entities['book']->name = 'Export Book';
+ $entities['book']->description = "This is a book with stuff to export";
+ $entities['chapter']->save();
+ $entities['book']->save();
+
+ $resp = $this->asEditor()->get($entities['book']->getUrl('/export/plaintext'));
+
+ $expected = "Export Book\nThis is a book with stuff to export\n\nExport chapter\nA test chapter to be exported\nIt has loads of info within\n\n";
+ $expected .= "My wonderful page!\nMy great page Full of great stuff";
+ $resp->assertSee($expected);
+ }
+