Files
growstuff/spec/requests/pages_controller_spec.rb
39e65fd848 Remove CMS - use haml pages instead (#4899)
* Add support and terms of service pages with corresponding routes

- Created a new support page with frequently asked questions.
- Added a terms of service page outlining user agreements and policies.
- Removed old support index and CMS initializer files.
- Updated routes to include new policy and support paths.
- Implemented tests for new pages and footer links.
- Adjusted database migration for CMS content compatibility.

* Remove custom JavaScript file for the admin area

* Add kramdown gem for Markdown support in Haml

* Fix various typos and link formatting issues

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* remove reference to paid account

* Remove reference to paid accounts from support page

* Remove references to paid and permanent accounts from Terms of Service

* removing references to paid accounts

* Update contact email link format in TOS

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Add new pages and routes for About, Policies, and Copyright; update existing pages

* Fix typos and improve clarity in community guidelines, copyright policy, data use policy, privacy policy, support page, and terms of service

* Drop stale expectation

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2026-10-12 03:05:12 +10:30

26 lines
771 B
Ruby

# frozen_string_literal: true
require 'rails_helper'
describe PagesController do
{
'/policy/tos' => 'Growstuff Terms of Service',
'/policy/privacy' => 'Privacy Policy',
'/policy/api' => 'API and Data Use Policy',
'/policy/community' => 'Growstuff Community Guidelines',
'/support' => 'Support - Frequently Asked Questions',
'/about/contact' => 'Contact',
'/about' => 'About',
'/policy' => 'Policy',
'/policy/copyright' => 'Copyright Infringement Policy'
}.each do |path, heading|
it "shows #{path}" do
get path
expect(response).to have_http_status(:ok)
expect(response.body).to include("<h1")
expect(response.body).to include(heading)
end
end
end