From cc2f4487f32db05e2f65722a72d00ebbf9dd5b09 Mon Sep 17 00:00:00 2001 From: Jesse Malark <24375474+jmalark@users.noreply.github.com> Date: Wed, 29 Apr 2026 22:23:41 -0400 Subject: [PATCH] AO3-7426 Adjust page subtitle for showing a wrangling guideline --- app/controllers/wrangling_guidelines_controller.rb | 1 + features/tags_and_wrangling/wrangling_guidelines.feature | 1 + spec/controllers/wrangling_guidelines_controller_spec.rb | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/app/controllers/wrangling_guidelines_controller.rb b/app/controllers/wrangling_guidelines_controller.rb index f015a185d68..86e9e266bd7 100644 --- a/app/controllers/wrangling_guidelines_controller.rb +++ b/app/controllers/wrangling_guidelines_controller.rb @@ -9,6 +9,7 @@ def index # GET /wrangling_guidelines/1 def show @wrangling_guideline = WranglingGuideline.find(params[:id]) + @page_subtitle = @wrangling_guideline.title end # GET /wrangling_guidelines/new diff --git a/features/tags_and_wrangling/wrangling_guidelines.feature b/features/tags_and_wrangling/wrangling_guidelines.feature index 837b0709ed2..1306ebdb8c1 100644 --- a/features/tags_and_wrangling/wrangling_guidelines.feature +++ b/features/tags_and_wrangling/wrangling_guidelines.feature @@ -16,6 +16,7 @@ Feature: Wrangling Guidelines When I go to the wrangling_guidelines page And I follow "Intro and General Concepts" Then I should see "This series of documents (Wrangling Guidelines) are intended to help tag wranglers remain consistent as they go about the business of wrangling tags by providing a set of formatting guidelines." within ".userstuff" + And the page title should include "Intro and General Concepts" Scenario: Edit Wrangling Guideline diff --git a/spec/controllers/wrangling_guidelines_controller_spec.rb b/spec/controllers/wrangling_guidelines_controller_spec.rb index c66430023ac..cca42940616 100644 --- a/spec/controllers/wrangling_guidelines_controller_spec.rb +++ b/spec/controllers/wrangling_guidelines_controller_spec.rb @@ -26,6 +26,11 @@ expect(response).to render_template("show") expect(assigns(:wrangling_guideline)).to eq(guideline) end + + it "assigns page subtitle using guideline title" do + get :show, params: { id: guideline.id } + expect(assigns[:page_subtitle]).to eq(guideline.title) + end end describe "GET #new" do