hablo/test/Mock/Article.hs

54 lines
1.2 KiB
Haskell

module Mock.Article (
noDescription
, noImage
, noMeta
, simple
) where
import Article (Article(..))
import qualified Data.Map as Map (fromList)
import Markdown (Markdown(..))
simple :: Article
simple = Article (Markdown {
key = "test"
, path = "article/test"
, Markdown.title = "Some test"
, metadata = Map.fromList [
("summary", "It's a test")
, ("featuredImage", "test.png")
]
, bodyOffset = 3
, body = []
})
noImage :: Article
noImage = Article (Markdown {
key = "test"
, path = "article/test"
, Markdown.title = "Some test"
, metadata = Map.fromList [("summary", "It's a test")]
, bodyOffset = 3
, body = []
})
noDescription :: Article
noDescription = Article (Markdown {
key = "test"
, path = "article/test"
, Markdown.title = "Some test"
, metadata = Map.fromList [("featuredImage", "test.png")]
, bodyOffset = 3
, body = []
})
noMeta :: Article
noMeta = Article (Markdown {
key = "test"
, path = "article/test"
, Markdown.title = "Some test"
, metadata = Map.fromList []
, bodyOffset = 3
, body = []
})