diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2016-04-06 14:26:46 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2016-04-06 14:26:46 +0200 |
commit | e81468e0f64fdbe05794d5f8ccaebc00ee474ee2 (patch) | |
tree | 882c422a312ed3e6eb8eaacfcc9c292a09296845 /tests/Hakyll/Core/Routes | |
parent | 3f3e09672d3d279bc5cbaa8b3ac7508abc98aa2d (diff) | |
download | hakyll-e81468e0f64fdbe05794d5f8ccaebc00ee474ee2.tar.gz |
Initial YAML support
See #225
Diffstat (limited to 'tests/Hakyll/Core/Routes')
-rw-r--r-- | tests/Hakyll/Core/Routes/Tests.hs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/Hakyll/Core/Routes/Tests.hs b/tests/Hakyll/Core/Routes/Tests.hs index 4f975ae..5a833b0 100644 --- a/tests/Hakyll/Core/Routes/Tests.hs +++ b/tests/Hakyll/Core/Routes/Tests.hs @@ -6,15 +6,13 @@ module Hakyll.Core.Routes.Tests -------------------------------------------------------------------------------- -import qualified Data.Map as M +import Data.Maybe (fromMaybe) +import Hakyll.Core.Identifier +import Hakyll.Core.Metadata +import Hakyll.Core.Routes import System.FilePath ((</>)) import Test.Framework (Test, testGroup) import Test.HUnit (Assertion, (@=?)) - - --------------------------------------------------------------------------------- -import Hakyll.Core.Identifier -import Hakyll.Core.Routes import TestSuite.Util @@ -37,7 +35,7 @@ tests = testGroup "Hakyll.Core.Routes.Tests" $ fromAssertions "runRoutes" "tags/rss/bar" , testRoutes "food/example.md" (metadataRoute $ \md -> customRoute $ \id' -> - M.findWithDefault "?" "subblog" md </> toFilePath id') + fromMaybe "?" (lookupString "subblog" md) </> toFilePath id') "example.md" ] |