From 3c24e0ff07c46cc2a0a193feb0001b47b89e8dd0 Mon Sep 17 00:00:00 2001 From: patrick brisbin Date: Sun, 3 Jan 2016 10:31:14 -0500 Subject: [PATCH] Add basic testing infrastructure What sort of tests we'll be able to add is yet to be figured out, but this at least puts a no-op, hspec-based testing target in place. --- test/Spec.hs | 1 + test/Yesod/Auth/OAuth2Spec.hs | 15 +++++++++++++++ yesod-auth-oauth2.cabal | 9 +++++++++ 3 files changed, 25 insertions(+) create mode 100644 test/Spec.hs create mode 100644 test/Yesod/Auth/OAuth2Spec.hs diff --git a/test/Spec.hs b/test/Spec.hs new file mode 100644 index 0000000..a824f8c --- /dev/null +++ b/test/Spec.hs @@ -0,0 +1 @@ +{-# OPTIONS_GHC -F -pgmF hspec-discover #-} diff --git a/test/Yesod/Auth/OAuth2Spec.hs b/test/Yesod/Auth/OAuth2Spec.hs new file mode 100644 index 0000000..b0c5ca9 --- /dev/null +++ b/test/Yesod/Auth/OAuth2Spec.hs @@ -0,0 +1,15 @@ +module Yesod.Auth.OAuth2Spec + ( main + , spec + ) where + +import Test.Hspec +import Yesod.Auth.OAuth2 + +main :: IO () +main = hspec spec + +spec :: Spec +spec = describe "authOAuth2" $ + it "works" $ + True `shouldBe` True diff --git a/yesod-auth-oauth2.cabal b/yesod-auth-oauth2.cabal index c740627..024d7f7 100644 --- a/yesod-auth-oauth2.cabal +++ b/yesod-auth-oauth2.cabal @@ -50,6 +50,15 @@ library ghc-options: -Wall +test-suite test + type: exitcode-stdio-1.0 + main-is: Spec.hs + hs-source-dirs: test + ghc-options: -Wall + build-depends: base + , yesod-auth-oauth2 + , hspec + source-repository head type: git location: https://github.com/thoughtbot/yesod-auth-oauth2.git