diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index d1658cab7..fbcbc1058 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -40,6 +40,12 @@ class PagesController < ApplicationController set_surrogate_key_header "community_moderation_page" end + def contact + @page = Page.find_by(slug: "contact") + render :show if @page + set_surrogate_key_header "contact" + end + def faq @page = Page.find_by(slug: "faq") render :show if @page diff --git a/spec/requests/pages_spec.rb b/spec/requests/pages_spec.rb index c4ec99b65..127c9d9ca 100644 --- a/spec/requests/pages_spec.rb +++ b/spec/requests/pages_spec.rb @@ -118,6 +118,13 @@ RSpec.describe "Pages", type: :request do end end + describe "GET /contact" do + it "has proper headline" do + get "/contact" + expect(response.body).to include("Contact") + end + end + describe "GET /welcome" do let(:user) { create(:user, id: 1) }