stripe-tests 2.4.1 → 2.5.0
raw patch · 2 files changed
+8/−5 lines, 2 files
Files
stripe-tests.cabal view
@@ -1,5 +1,5 @@ name: stripe-tests-version: 2.4.1+version: 2.5.0 synopsis: Tests for Stripe API bindings for Haskell license: MIT license-file: LICENSE@@ -17,7 +17,7 @@ . [100+ Hspec Tests] This cabal package contains all the Stripe Hspec tests in an HTTP backend agnostic format.- To run these tests you will need to install a package such as `stripe-http-streams`.+ To run these tests you will need to install a package such as `stripe-http-client`. This allows each backend to run the full testsuite. library@@ -62,6 +62,7 @@ Web.Stripe.Test.Util Web.Stripe.Test.AllTests ghc-options: -Wall+ source-repository head type: git
tests/Web/Stripe/Test/Config.hs view
@@ -15,17 +15,19 @@ getConfig :: (forall a. StripeConfig -> Stripe a -> IO (Either StripeError a)) -> IO StripeConfig getConfig stripe = maybe enterKey foundKey =<< lookupEnv "STRIPEKEY" where- foundKey = return . StripeConfig . StripeKey . B8.pack+ foundKey = return . flip StripeConfig Nothing . StripeKey . B8.pack enterKey = do putStrLn "Please enter your Stripe *TEST* account"- config <- StripeConfig . StripeKey. B8.pack <$> getLine+ config <- StripeConfig+ <$> do StripeKey . B8.pack <$> getLine+ <*> pure Nothing result <- stripe config (stripeLift getBalance) case result of Left err -> print err >> exitFailure Right Balance{..} -> case balanceLiveMode of False -> return config- True -> do putStrLn "You entered your production credentials, woops :)" + True -> do putStrLn "You entered your production credentials, woops :)" exitFailure