Merge pull request #126 from astro/master

updates for build on nixos-20.03
This commit is contained in:
Nek0 - 2020-06-06 07:36:08 +02:00 committed by GitHub
commit 94b5dc497a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 21 additions and 16 deletions

View File

@ -217,9 +217,8 @@ sendMail to subject body =
, mailParts =[[Part
{ partType = "text/plain; charset=utf-8"
, partEncoding = None
, partFilename = Nothing
, partHeaders = []
, partContent = E.encodeUtf8 body
, partContent = PartContent $ E.encodeUtf8 body
}]]
}

View File

@ -20,7 +20,7 @@
-- declared in the Foundation.hs file.
module Settings where
import ClassyPrelude.Yesod hiding (throw)
import ClassyPrelude.Yesod
import Control.Exception (throw)
import Data.Aeson (Result (..), fromJSON, withObject, (.!=),
(.:?))

View File

@ -34,5 +34,7 @@ mkDerivation {
persistent persistent-mysql resourcet transformers yesod yesod-core
yesod-test
];
doCheck = false;
doHaddock = false;
license = stdenv.lib.licenses.agpl3;
}

View File

@ -12,7 +12,7 @@ spec = withApp $ do
request $ do
setMethod "POST"
setUrl HomeR
addNonce
addToken
fileByLabel "Choose a file" "test/Spec.hs" "text/plain" -- talk about self-reference
byLabel "What's on the file?" "Some Content"

View File

@ -3,8 +3,7 @@ module Handler.SupplierActionsSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
spec =
describe "getSupplierActionsR" $ do
error "Spec not implemented: getSupplierActionsR"
xit "Spec not implemented: getSupplierActionsR" $ do
pending

View File

@ -3,8 +3,7 @@ module Handler.SupplierSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
spec =
describe "getSupplierR" $ do
error "Spec not implemented: getSupplierR"
xit "Spec not implemented: getSupplierR" $ do
pending

View File

@ -4,8 +4,8 @@ module TestImport
) where
import Application (makeFoundation)
import ClassyPrelude as X
import Database.Persist as X hiding (get)
import ClassyPrelude as X hiding (Handler)
import Database.Persist as X hiding (get, delete, deleteBy)
import Database.Persist.Sql (SqlPersistM, runSqlPersistMPool)
import Foundation as X
import Model as X
@ -18,10 +18,10 @@ runDB query = do
pool <- fmap appConnPool getTestYesod
liftIO $ runSqlPersistMPool query pool
withApp :: SpecWith App -> Spec
withApp :: SpecWith (App, a -> a) -> Spec
withApp = before $ do
settings <- loadAppSettings
["config/test-settings.yml", "config/settings.yml"]
[]
ignoreEnv
makeFoundation settings
(, id) <$> makeFoundation settings

View File

@ -164,6 +164,12 @@ test-suite test
ViewPatterns
TupleSections
other-modules: Handler.CommonSpec
Handler.HomeSpec
Handler.SupplierActionsSpec
Handler.SupplierSpec
TestImport
build-depends: base
, yammat
, yesod-test >= 1.4.2