Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Present editionable topical events summary #9728

Draft
wants to merge 1 commit into
base: present-editionable-topical-events
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ def initialize(item, update_type: nil, state: "published")
def content
content = BaseItemPresenter.new(
item,
title: item.title,
update_type:,
).base_attributes

content.merge!(
description: item.summary,
details:,
document_type: item.class.name.underscore,
public_updated_at: item.updated_at,
Expand Down
1 change: 1 addition & 0 deletions test/factories/editionable_topical_events.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FactoryBot.define do
factory :editionable_topical_event, class: EditionableTopicalEvent, parent: :edition do
title { "editionable-topical-event-title" }
summary { "Some basic info about the event" }
end

factory :draft_editionable_topical_event, parent: :editionable_topical_event, traits: [:draft]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def present(...)
expected_hash = {
base_path: public_path,
title: topical_event.title,
description: topical_event.summary,
schema_name: "topical_event",
document_type: "editionable_topical_event",
locale: "en",
Expand Down
Loading