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

Remove references to Books and Art pillars #432

Merged
merged 2 commits into from
Sep 11, 2024
Merged
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 @@ -186,7 +186,7 @@ object CapiModelEnrichment {
(tagExistsWithId("tone/comment")(content) && isPillar("News")(content)) ||
(tagExistsWithId("tone/letters")(content) && isPillar("News")(content)) ||
isPillar("Opinion")(content)
val isCulture: ContentFilter = content => isPillar("Arts")(content) || isPillar("Books")(content)
Copy link
Contributor

@JamieB-gu JamieB-gu Sep 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't CAPI still use "arts" to represent culture?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good catch! I wasn't aware this was a thing. Will correct it

val isCulture: ContentFilter = content => isPillar("Arts")(content)

val predicates: List[(ContentFilter, Theme)] = List(
isSpecialReport -> SpecialReportTheme,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,12 +520,6 @@ class CapiModelEnrichmentFormatTest extends AnyFlatSpec with MockitoSugar with M
f.content.theme shouldEqual CulturePillar
}

it should "return a theme of 'CulturePillar' when has a pillarName of 'Books'" in {
val f = fixture
when(f.content.pillarName) thenReturn Some("Books")

f.content.theme shouldEqual CulturePillar
}

it should "return a theme of 'LifestylePillar' when has a pillarName of 'Lifestyle'" in {
val f = fixture
Expand Down
Loading