]> BookStack Code Mirror - bookstack/commitdiff
Added test to cover PR #3177
authorDan Brown <redacted>
Mon, 24 Jan 2022 18:23:16 +0000 (18:23 +0000)
committerDan Brown <redacted>
Mon, 24 Jan 2022 18:23:16 +0000 (18:23 +0000)
tests/Entity/PageTest.php

index 32459a84a691e2c2191ede504d5c65683df1d62f..1d7806047705afd7e1b9b4acde876a2f162ec74e 100644 (file)
@@ -261,6 +261,21 @@ class PageTest extends TestCase
             ->assertElementContains('.entity-list .page:nth-child(1)', $content['page']->name);
     }
 
+    public function test_recently_updated_pages_view_shows_updated_by_details()
+    {
+        $user = $this->getEditor();
+        /** @var Page $page */
+        $page = Page::query()->first();
+
+        $this->actingAs($user)->put($page->getUrl(), [
+            'name' => 'Updated title',
+            'html' => '<p>Updated content</p>',
+        ]);
+
+        $resp = $this->asAdmin()->get('/pages/recently-updated');
+        $resp->assertElementContains('.entity-list .page:nth-child(1)', 'Updated 1 second ago by ' . $user->name);
+    }
+
     public function test_recently_updated_pages_on_home()
     {
         /** @var Page $page */
Morty Proxy This is a proxified and sanitized view of the page, visit original site.