Skip to content

Commit 0b7979f

Browse files
committed
Fix URL mapping for CaseStudy now it's migrated to StandardEdition
When we bulk update the organisations that are tagged to a given CSV of documents, we use this BasePathHelper to help with looking up the Edition based on the document's URL. It saves the publisher from having to provide the document types ahead of time. CaseStudy was recently moved to StandardEdition so its mapping needs updating accordingly.
1 parent 7eabff5 commit 0b7979f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app/helpers/admin/base_path_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Admin::BasePathHelper
44
MAPPINGS = [
55
{ "CallForEvidence" => "/government/calls-for-evidence" },
6-
{ "CaseStudy" => "/government/case-studies" },
6+
{ "StandardEdition" => "/government/case-studies" },
77
{ "Consultation" => "/government/consultations" },
88
{ "DetailedGuide" => "/guidance" },
99
{ "DocumentCollection" => "/government/collections" },

test/unit/app/helpers/admin/base_path_helper_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Admin::BasePathHelperTest < ActionView::TestCase
88
describe "#url_to_document_type" do
99
test "it maps a URL to a document type" do
1010
assert_equal CallForEvidence, url_to_document_type("/government/calls-for-evidence/slug")
11-
assert_equal CaseStudy, url_to_document_type("/government/case-studies/slug")
11+
assert_equal StandardEdition, url_to_document_type("/government/case-studies/slug")
1212
assert_equal Consultation, url_to_document_type("/government/consultations/slug")
1313
assert_equal DetailedGuide, url_to_document_type("/guidance/slug")
1414
assert_equal DocumentCollection, url_to_document_type("/government/collections/slug")

0 commit comments

Comments
 (0)