module Freckle.App.Test.Properties.PathPiece
  ( prop_roundTripPathPiece
  ) where

import Freckle.App.Prelude

import Web.PathPieces

-- | Check that @fromPathPiece (toPathPiece value)@ is @value@
prop_roundTripPathPiece :: (PathPiece a, Eq a) => a -> Bool
prop_roundTripPathPiece :: forall a. (PathPiece a, Eq a) => a -> Bool
prop_roundTripPathPiece a
a = forall s. PathPiece s => Text -> Maybe s
fromPathPiece (forall s. PathPiece s => s -> Text
toPathPiece a
a) forall a. Eq a => a -> a -> Bool
== forall a. a -> Maybe a
Just a
a