Commit 539bc61c authored by MrMan's avatar MrMan

Working simple SQLiteTaskStore creation w/ defaults test

parent 67110e2c
module Components.TaskStore.SQLiteSpec (spec) where
import Components.TaskStore.SQLite (SQLiteTaskStore)
import Types (Constructable(..), HasMigratableDB(..), TaskStore(..))
import Types (Constructable(..), HasMigratableDB(..), TaskStore(..), TaskStoreError)
import Config (defaultCompleteTaskStoreConfig)
import Data.Either (isRight)
import Control.Monad.IO.Class (liftIO)
import Test.Hspec
makeDefaultStore :: IO (Either TaskStoreError SQLiteTaskStore)
makeDefaultStore = construct defaultCompleteTaskStoreConfig
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "task store creation" $ do
it "works" $ \_ -> liftIO (construct defaultCompleteTaskStoreConfig)
>> shouldBe True True
it "works with the default config" $ \_ -> liftIO makeDefaultStore
>>= (`shouldBe` True) . isRight
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment