servant/servant-foreign/test/Servant/ForeignSpec.hs
2015-11-04 11:27:07 +00:00

17 lines
461 B
Haskell

{-# LANGUAGE OverloadedStrings #-}
module Servant.ForeignSpec where
import Servant.Foreign (camelCase)
import Test.Hspec
spec :: Spec
spec = describe "Servant.Foreign" $ do
camelCaseSpec
camelCaseSpec :: Spec
camelCaseSpec = describe "camelCase" $ do
it "converts FunctionNames to camelCase" $ do
camelCase ["post", "counter", "inc"] `shouldBe` "postCounterInc"
camelCase ["get", "hyphen-ated", "counter"] `shouldBe` "getHyphenatedCounter"