Fixbuild tests and linter

This commit is contained in:
SJost 2019-02-28 11:55:28 +01:00
parent 0a49fb00e2
commit 27dffe7d08
4 changed files with 11 additions and 4 deletions

View File

@ -7,7 +7,7 @@ module Database.Esqueleto.Utils
, SqlIn(..)
) where
import ClassyPrelude.Yesod hiding (isInfixOf, (||.), any, all)
import ClassyPrelude.Yesod hiding (isInfixOf, any, all)
import qualified Data.Foldable as F
import qualified Database.Esqueleto as E
import Database.Esqueleto.Utils.TH

View File

@ -93,6 +93,7 @@ fillDb = do
gkleen <- insert User
{ userIdent = "G.Kleen@campus.lmu.de"
, userAuthentication = AuthLDAP
, userLastAuthentication = Just now
, userMatrikelnummer = Nothing
, userEmail = "G.Kleen@campus.lmu.de"
, userDisplayName = "Gregor Kleen"
@ -109,6 +110,7 @@ fillDb = do
fhamann <- insert User
{ userIdent = "felix.hamann@campus.lmu.de"
, userAuthentication = AuthLDAP
, userLastAuthentication = Nothing
, userMatrikelnummer = Nothing
, userEmail = "felix.hamann@campus.lmu.de"
, userDisplayName = "Felix Hamann"
@ -125,6 +127,7 @@ fillDb = do
jost <- insert User
{ userIdent = "jost@tcs.ifi.lmu.de"
, userAuthentication = AuthLDAP
, userLastAuthentication = Nothing
, userMatrikelnummer = Nothing
, userEmail = "jost@tcs.ifi.lmu.de"
, userDisplayName = "Steffen Jost"
@ -141,6 +144,7 @@ fillDb = do
maxMuster <- insert User
{ userIdent = "max@campus.lmu.de"
, userAuthentication = AuthLDAP
, userLastAuthentication = Just now
, userMatrikelnummer = Just "1299"
, userEmail = "max@campus.lmu.de"
, userDisplayName = "Max Musterstudent"
@ -157,6 +161,7 @@ fillDb = do
tinaTester <- insert $ User
{ userIdent = "tester@campus.lmu.de"
, userAuthentication = AuthLDAP
, userLastAuthentication = Nothing
, userMatrikelnummer = Just "999"
, userEmail = "tester@campus.lmu.de"
, userDisplayName = "Tina Tester"

View File

@ -40,6 +40,7 @@ instance Arbitrary User where
, on (\l d -> l <> "@" <> d) getPrintableString <$> arbitrary <*> arbitrary
]
userAuthentication <- arbitrary
userLastAuthentication <- arbitrary
userMatrikelnummer <- fmap pack . assertM' (not . null) <$> listOf (elements ['0'..'9'])
userEmail <- CI.mk . decodeUtf8 . Email.toByteString <$> arbitrary

View File

@ -107,6 +107,7 @@ createUser adjUser = do
let
userMatrikelnummer = Nothing
userAuthentication = AuthLDAP
userLastAuthentication = Nothing
userIdent = "dummy@example.invalid"
userEmail = "dummy@example.invalid"
userDisplayName = "Dummy Example"