Skip to content

Commit

Permalink
add crossword design
Browse files Browse the repository at this point in the history
  • Loading branch information
SiAdcock committed Jan 7, 2025
1 parent 6720a1f commit 01f7325
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ object CapiModelEnrichment {
isPictureContent -> PictureDesign,
tagExistsWithId("type/audio") -> AudioDesign,
tagExistsWithId("type/video") -> VideoDesign,
tagExistsWithId("type/crosswords") -> CrosswordDesign,
isReview -> ReviewDesign,
isObituary -> ObituaryDesign,
tagExistsWithId("tone/analysis") -> AnalysisDesign,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ case object GalleryDesign extends Design
case object PictureDesign extends Design
case object AudioDesign extends Design
case object VideoDesign extends Design
case object CrosswordDesign extends Design
case object ReviewDesign extends Design
case object AnalysisDesign extends Design
case object ExplainerDesign extends Design
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ class CapiModelEnrichmentDesignTypeTest extends AnyFlatSpec with MockitoSugar wi
f.content.designType shouldEqual Media
}

it should "have a designType of 'Crossword' when tag type/crossword is present" in {
val f = fixture
when(f.tag.id) thenReturn "type/crossword"

f.content.designType shouldEqual Crossword
}

it should "have a designType of 'Review' when tag tone/reviews is present" in {
val f = fixture
when(f.tag.id) thenReturn "tone/reviews"
Expand Down

0 comments on commit 01f7325

Please sign in to comment.