Skip to content

Commit

Permalink
add paginatedServer to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kutyel committed Feb 18, 2025
1 parent e5f0350 commit 980064e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions servant-client/test/Servant/ClientTestUtils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -473,3 +473,9 @@ usersServer mpage = do
let pageNum = maybe 1 unRange mpage
-- pageNum is guaranteed to be between 1 and 100
return [Person "Example" $ fromIntegral pageNum]

paginatedAPI :: Proxy PaginatedAPI
paginatedAPI = Proxy

paginatedServer :: Application
paginatedServer = serve paginatedAPI usersServer

0 comments on commit 980064e

Please sign in to comment.