Skip to content

Commit 33b093c

Browse files
committed
CI runs out of API rate limit
+ Other cleanup
1 parent 277f9b6 commit 33b093c

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

spec/GitHub/PublicSSHKeysSpec.hs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,16 @@
22
{-# LANGUAGE TemplateHaskell #-}
33
module GitHub.PublicSSHKeysSpec where
44

5-
import GitHub (Auth (..), PublicSSHKeyBasic (..), PublicSSHKey (..),
6-
executeRequest, repositoryR)
7-
import GitHub.Endpoints.Users.PublicSSHKeys (publicSSHKeysFor', publicSSHKeys',
8-
publicSSHKey')
5+
import GitHub
6+
(Auth (..), FetchCount (..), PublicSSHKey (..), executeRequest)
7+
import GitHub.Endpoints.Users.PublicSSHKeys
8+
(publicSSHKey', publicSSHKeys', publicSSHKeysForR)
99

1010
import Data.Either.Compat (isRight)
1111
import Data.String (fromString)
1212
import System.Environment (lookupEnv)
13-
import Test.Hspec (Spec, describe, it, pendingWith, shouldBe,
14-
shouldSatisfy)
13+
import Test.Hspec (Spec, describe, it, pendingWith, shouldSatisfy)
1514

16-
import qualified Data.HashMap.Strict as HM
1715
import qualified Data.Vector as V
1816

1917
fromRightS :: Show a => Either a b -> b
@@ -30,8 +28,8 @@ withAuth action = do
3028
spec :: Spec
3129
spec = do
3230
describe "publicSSHKeysFor'" $ do
33-
it "works" $ do
34-
keys <- publicSSHKeysFor' "phadej"
31+
it "works" $ withAuth $ \auth -> do
32+
keys <- executeRequest auth $ publicSSHKeysForR "phadej" FetchAll
3533
V.length (fromRightS keys) `shouldSatisfy` (> 1)
3634

3735
describe "publicSSHKeys' and publicSSHKey'" $ do

0 commit comments

Comments
 (0)