2020-12-13 20:09:23 +01:00
|
|
|
module Mock.Article (
|
2021-03-28 23:38:53 +02:00
|
|
|
hostRelativeImage
|
|
|
|
, noDescription
|
2020-12-13 20:09:23 +01:00
|
|
|
, noImage
|
|
|
|
, noMeta
|
2021-03-28 23:38:53 +02:00
|
|
|
, remoteImage
|
2020-12-13 20:09:23 +01:00
|
|
|
, simple
|
|
|
|
) where
|
|
|
|
|
|
|
|
import Article (Article(..))
|
2021-03-28 23:38:53 +02:00
|
|
|
import qualified Data.Map as Map (fromList, insert)
|
2020-12-13 20:09:23 +01:00
|
|
|
import Markdown (Markdown(..))
|
|
|
|
import Mock.Markdown (article)
|
|
|
|
|
|
|
|
simple :: Article
|
|
|
|
simple = Article article
|
|
|
|
|
|
|
|
noImage :: Article
|
|
|
|
noImage = Article $ article {metadata = Map.fromList [("summary", "It's a test")]}
|
|
|
|
|
2021-03-28 23:38:53 +02:00
|
|
|
remoteImage :: Article
|
|
|
|
remoteImage = Article $ article {metadata = setImage $ metadata article}
|
|
|
|
where
|
|
|
|
setImage = Map.insert "featuredImage" "https://somewhere.el.se/test.png"
|
|
|
|
|
|
|
|
hostRelativeImage :: Article
|
|
|
|
hostRelativeImage = Article $ article {metadata = setImage $ metadata article}
|
|
|
|
where
|
|
|
|
setImage = Map.insert "featuredImage" "/media/test.png"
|
|
|
|
|
2020-12-13 20:09:23 +01:00
|
|
|
noDescription :: Article
|
|
|
|
noDescription = Article $ article {metadata = Map.fromList [("featuredImage", "test.png")]}
|
|
|
|
|
|
|
|
noMeta :: Article
|
|
|
|
noMeta = Article $ article {metadata = Map.fromList []}
|