about summary refs log blame commit diff
path: root/website/sandbox/learnpianochords/src/server/TestUtils.hs
blob: c586f7f219ba034ea014ee466416b7112aefd46e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                                
--------------------------------------------------------------------------------
module TestUtils where
--------------------------------------------------------------------------------
import Web.JWT
import Data.String.Conversions (cs)
--------------------------------------------------------------------------------

unsafeStringOrURI :: String -> StringOrURI
unsafeStringOrURI x =
  case stringOrURI (cs x) of
    Nothing -> error $ "Failed to convert to StringOrURI: " ++ x
    Just x  -> x