Skip to content

Commit

Permalink
Merge pull request #9536 from alphagov/add-file-attachments-to-case-s…
Browse files Browse the repository at this point in the history
…tudies

Allow file attachments on Case Studies
  • Loading branch information
ChrisBAshton authored Oct 17, 2024
2 parents b0995fd + fc6608e commit 782dbd1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/models/case_study.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class CaseStudy < Edition
include Edition::Searchable

include ::Attachable
include Edition::Images
include Edition::FactCheckable
include Edition::CustomLeadImage
Expand Down
2 changes: 1 addition & 1 deletion test/unit/app/helpers/admin/tabbed_nav_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def current_user
end

test "#secondary_navigation_tabs_items for persisted editions which do not allow attachments" do
%i[case_study fatality_notice speech].each do |type|
%i[fatality_notice speech].each do |type|
edition = build_stubbed(type)

expected_output = [
Expand Down
2 changes: 2 additions & 0 deletions test/unit/app/models/case_study_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ class CaseStudyTest < ActiveSupport::TestCase
include ActionDispatch::TestProcess

should_allow_image_attachments
should_be_attachable
should_allow_inline_attachments
should_have_custom_lead_image
should_protect_against_xss_and_content_attacks_on :case_study, :body

Expand Down

0 comments on commit 782dbd1

Please sign in to comment.