]);
$resp = $this->asAdmin()->get('/pages/recently-updated');
- $this->withHtml($resp)->assertElementContains('.entity-list .page:nth-child(1)', 'Updated 1 second ago by ' . $user->name);
+ $this->withHtml($resp)->assertElementContains('.entity-list .page:nth-child(1) small', 'by ' . $user->name);
}
public function test_recently_updated_pages_view_shows_parent_chain()
$resp = $this->get('/');
$this->withHtml($resp)->assertElementContains('#recently-updated-pages', $page->name);
}
+
+ public function test_page_edit_without_update_permissions_but_with_view_redirects_to_page()
+ {
+ $page = $this->entities->page();
+
+ $resp = $this->asViewer()->get($page->getUrl('/edit'));
+ $resp->assertRedirect($page->getUrl());
+
+ $resp->assertSessionHas('error', 'You do not have permission to access the requested page.');
+ }
}