From 5f8aaec1460508d1b5963eb18fdbf188bee4eeb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Deest?= Date: Mon, 4 Oct 2021 14:01:11 +0200 Subject: [PATCH] Fix client tests --- servant-client-core/src/Servant/Client/Core/Reexport.hs | 2 ++ servant-client/test/Servant/ClientTestUtils.hs | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/servant-client-core/src/Servant/Client/Core/Reexport.hs b/servant-client-core/src/Servant/Client/Core/Reexport.hs index 7d2aa980..32c03eca 100644 --- a/servant-client-core/src/Servant/Client/Core/Reexport.hs +++ b/servant-client-core/src/Servant/Client/Core/Reexport.hs @@ -7,6 +7,7 @@ module Servant.Client.Core.Reexport HasClient(..) , foldMapUnion , matchUnion + , AsClientT -- * Response (for @Raw@) , Response @@ -23,6 +24,7 @@ module Servant.Client.Core.Reexport , showBaseUrl , parseBaseUrl , InvalidBaseUrlException + ) where diff --git a/servant-client/test/Servant/ClientTestUtils.hs b/servant-client/test/Servant/ClientTestUtils.hs index aedc3f91..944c9614 100644 --- a/servant-client/test/Servant/ClientTestUtils.hs +++ b/servant-client/test/Servant/ClientTestUtils.hs @@ -64,13 +64,11 @@ import Servant.API JSON, MimeRender (mimeRender), MimeUnrender (mimeUnrender), NoContent (NoContent), PlainText, Post, QueryFlag, QueryParam, QueryParams, Raw, ReqBody, StdMethod (GET), ToHttpApiData (..), UVerb, Union, - WithStatus (WithStatus), addHeader) -import Servant.API.Generic + WithStatus (WithStatus), NamedRoutes, addHeader) +import Servant.API.Generic ((:-)) import Servant.Client -import Servant.Client.Generic import qualified Servant.Client.Core.Auth as Auth import Servant.Server -import Servant.Server.Generic import Servant.Server.Experimental.Auth import Servant.Test.ComprehensiveAPI @@ -184,6 +182,7 @@ uverbGetSuccessOrRedirect :: Bool -> ClientM (Union '[WithStatus 200 Person, WithStatus 301 Text]) uverbGetCreated :: ClientM (Union '[WithStatus 201 Person]) +recordRoutes :: RecordRoutes (AsClientT ClientM) getRoot :<|> getGet