@@ -17,9 +17,9 @@
18module Servant.GenericSpec (spec) where
18module Servant.GenericSpec (spec) where
20−import Data.Function ((&))
21import Test.Hspec
20import Test.Hspec
22+import Servant.Client ((/:))
23import Servant.ClientTestUtils
23import Servant.ClientTestUtils
25spec :: Spec
25spec :: Spec
@@ -31,7 +31,7 @@ genericSpec = beforeAll (startWaiApp server) $ afterAll endWaiApp $ do
31 context "Record clients work as expected" $ do
31 context "Record clients work as expected" $ do
33 it "Client functions return expected values" $ \(_,baseUrl) -> do
33 it "Client functions return expected values" $ \(_,baseUrl) -> do
34− runClient (recordRoutes & version) baseUrl `shouldReturn` Right 42
34+ runClient (recordRoutes /: version) baseUrl `shouldReturn` Right 42
35− runClient (recordRoutes & echo $ "foo") baseUrl `shouldReturn` Right "foo"
35+ runClient (recordRoutes /: echo $ "foo") baseUrl `shouldReturn` Right "foo"
36 it "Clients can be nested" $ \(_,baseUrl) -> do
36 it "Clients can be nested" $ \(_,baseUrl) -> do
37− runClient (recordRoutes & otherRoutes & something) baseUrl `shouldReturn` Right ["foo", "bar", "pweet"]
37+ runClient (recordRoutes /: otherRoutes /: something) baseUrl `shouldReturn` Right ["foo", "bar", "pweet"]