stripe-tests 2.2.3 → 2.3.0
raw patch · 2 files changed
+34/−4 lines, 2 filesdep ~stripe-core
Dependency ranges changed: stripe-core
Files
stripe-tests.cabal view
@@ -1,5 +1,5 @@ name: stripe-tests-version: 2.2.3+version: 2.3.0 synopsis: Tests for Stripe API bindings for Haskell license: MIT license-file: LICENSE@@ -30,7 +30,7 @@ , random >= 1.1 && < 1.2 , hspec >= 2.1.0 && < 2.5 , hspec-core >= 2.1.0 && < 2.5- , stripe-core >= 2.0 && < 2.3+ , stripe-core , text >= 1.0 && < 1.3 , time >= 1.4 && < 1.9 , transformers >= 0.3 && < 0.6
tests/Web/Stripe/Test/Subscription.hs view
@@ -72,7 +72,7 @@ Month (PlanName "sample plan") void $ createSubscription cid planid- sub <- getSubscriptions cid -&- ExpandParams ["data.customer"]+ sub <- getSubscriptionsByCustomerId cid -&- ExpandParams ["data.customer"] void $ deletePlan planid void $ deleteCustomer cid return sub@@ -87,7 +87,37 @@ Month (PlanName "sample plan") void $ createSubscription cid planid- sub <- getSubscriptions cid+ sub <- getSubscriptionsByCustomerId cid+ void $ deletePlan planid+ void $ deleteCustomer cid+ return sub+ result `shouldSatisfy` isRight+ it "Succesfully retrieves all Subscriptions expanded" $ do+ planid <- makePlanId+ result <- stripe $ do+ Customer { customerId = cid } <- createCustomer+ void $ createPlan planid+ (Amount 0) -- free plan+ USD+ Month+ (PlanName "sample plan")+ void $ createSubscription cid planid+ sub <- getSubscriptions -&- ExpandParams ["data.customer"]+ void $ deletePlan planid+ void $ deleteCustomer cid+ return sub+ result `shouldSatisfy` isRight+ it "Succesfully retrieves all Subscriptions" $ do+ planid <- makePlanId+ result <- stripe $ do+ Customer { customerId = cid } <- createCustomer+ void $ createPlan planid+ (Amount 0) -- free plan+ USD+ Month+ (PlanName "sample plan")+ void $ createSubscription cid planid+ sub <- getSubscriptions void $ deletePlan planid void $ deleteCustomer cid return sub