Improve tests for static_pages with shared examples and helpers