@@ -3,11 +3,12 @@ module GitHub.PullRequestsSpec where
33
44import qualified GitHub
55
6- import Data.Either.Compat (isRight )
7- import Data.Foldable (for_ )
8- import Data.String (fromString )
9- import System.Environment (lookupEnv )
10- import Test.Hspec (Spec , describe , it , pendingWith , shouldSatisfy )
6+ import Data.Either.Compat (isRight )
7+ import Data.Foldable (for_ )
8+ import Data.Function.Compat ((&) )
9+ import Data.String (fromString )
10+ import System.Environment (lookupEnv )
11+ import Test.Hspec (Spec , describe , it , pendingWith , shouldSatisfy )
1112
1213fromRightS :: Show a => Either a b -> b
1314fromRightS (Right b) = b
@@ -25,11 +26,13 @@ spec = do
2526 describe " pullRequestsForR" $ do
2627 it " works" $ withAuth $ \ auth -> for_ repos $ \ (owner, repo) -> do
2728 cs <- GitHub. executeRequest auth $
28- GitHub. pullRequestsForR owner repo ( Just " closed " ) Nothing
29+ GitHub. pullRequestsForR owner repo opts Nothing
2930 cs `shouldSatisfy` isRight
3031 where
3132 repos =
3233 [ (" thoughtbot" , " paperclip" )
3334 , (" phadej" , " github" )
3435 , (" haskell" , " cabal" )
3536 ]
37+ opts = GitHub. defaultPullRequestOptions
38+ & GitHub. setPullRequestOptionsState GitHub. PullRequestStateClosed
0 commit comments