2021-04-05 21:45:18 +02:00
|
|
|
module Mock.URL (
|
|
|
|
cdnFavicon
|
2021-05-02 16:49:05 +02:00
|
|
|
, hostFavicon
|
2021-04-05 21:45:18 +02:00
|
|
|
, localDiscovered
|
|
|
|
, localFavicon
|
2021-05-02 16:49:05 +02:00
|
|
|
, prefixedTestSite
|
2021-04-05 21:45:18 +02:00
|
|
|
, testHost
|
2021-05-02 16:49:05 +02:00
|
|
|
, testSite
|
2021-04-05 21:45:18 +02:00
|
|
|
) where
|
|
|
|
|
2021-05-02 16:49:05 +02:00
|
|
|
import Blog.URL (AbsoluteURL(..))
|
2021-04-05 21:45:18 +02:00
|
|
|
import Network.URL (Host(..), Protocol(..), URL(..), URLType(..))
|
|
|
|
|
|
|
|
testHost :: Host
|
|
|
|
testHost = Host (HTTP True) "test.net" Nothing
|
|
|
|
|
2021-05-02 16:49:05 +02:00
|
|
|
testSite :: AbsoluteURL
|
|
|
|
testSite = AbsoluteURL {
|
|
|
|
Blog.URL.host = testHost
|
|
|
|
, urlPath = ""
|
|
|
|
, urlParams = []
|
|
|
|
}
|
|
|
|
|
|
|
|
prefixedTestSite :: AbsoluteURL
|
|
|
|
prefixedTestSite = AbsoluteURL {
|
|
|
|
Blog.URL.host = testHost
|
|
|
|
, urlPath = "subPath"
|
|
|
|
, urlParams = []
|
|
|
|
}
|
|
|
|
|
2021-04-05 21:45:18 +02:00
|
|
|
cdn :: Host
|
|
|
|
cdn = Host (HTTP True) "cdn.net" Nothing
|
|
|
|
|
|
|
|
cdnFavicon :: URL
|
|
|
|
cdnFavicon = URL {
|
|
|
|
url_type = Absolute cdn
|
|
|
|
, url_path = "favicon.png"
|
|
|
|
, url_params = []
|
|
|
|
}
|
|
|
|
|
2021-05-02 16:49:05 +02:00
|
|
|
hostFavicon :: URL
|
|
|
|
hostFavicon = URL {
|
|
|
|
url_type = HostRelative
|
|
|
|
, url_path = "favicon.png"
|
|
|
|
, url_params = []
|
|
|
|
}
|
|
|
|
|
2021-04-05 21:45:18 +02:00
|
|
|
localFavicon :: URL
|
|
|
|
localFavicon = URL {
|
2021-05-02 16:49:05 +02:00
|
|
|
url_type = PathRelative
|
2021-04-05 21:45:18 +02:00
|
|
|
, url_path = "favicon.png"
|
|
|
|
, url_params = []
|
|
|
|
}
|
|
|
|
|
|
|
|
localDiscovered :: URL
|
|
|
|
localDiscovered = URL {
|
2021-05-02 16:49:05 +02:00
|
|
|
url_type = PathRelative
|
2021-04-05 21:45:18 +02:00
|
|
|
, url_path = "skin/favicon.png"
|
|
|
|
, url_params = []
|
|
|
|
}
|