+ $zipResp = $this->asEditor()->get($page->getUrl("/export/zip"));
+ $zip = $this->extractZipResponse($zipResp);
+
+ $this->assertEquals($page->id, $zip->data['page']['id'] ?? null);
+ $this->assertArrayNotHasKey('book', $zip->data);
+ $this->assertArrayNotHasKey('chapter', $zip->data);
+
+ $now = time();
+ $date = Carbon::parse($zip->data['exported_at'])->unix();
+ $this->assertLessThan($now + 2, $date);
+ $this->assertGreaterThan($now - 2, $date);
+
+ $version = trim(file_get_contents(base_path('version')));
+ $this->assertEquals($version, $zip->data['instance']['version']);
+
+ $instanceId = decrypt($zip->data['instance']['id_ciphertext']);
+ $this->assertEquals('bookstack', $instanceId);
+ }
+
+ public function test_page_export()
+ {
+ // TODO
+ }
+
+ public function test_book_export()
+ {
+ // TODO
+ }
+
+ public function test_chapter_export()
+ {