fix(build): adjust user tests for new fields

This commit is contained in:
Steffen Jost 2021-12-15 13:19:02 +01:00
parent b38a89eece
commit 7141cccbe2
4 changed files with 10 additions and 2 deletions

View File

@ -113,7 +113,7 @@ getStatusR = do
<p> <p>
Current Time #{show currtime} Current Time #{show currtime}
<p> <p>
Compile Time #{show comptime} Compile Time #{comptime}
$maybe ctime <- readMay comptime $maybe ctime <- readMay comptime
<p> <p>
Build is #{show $ ddays ctime currtime} days old Build is #{show $ ddays ctime currtime} days old

View File

@ -138,8 +138,8 @@ fillDb = do
, userCsvOptions = def { csvFormat = csvPreset # CsvPresetExcel } , userCsvOptions = def { csvFormat = csvPreset # CsvPresetExcel }
, userSex = Just SexMale , userSex = Just SexMale
, userShowSex = userDefaultShowSex , userShowSex = userDefaultShowSex
, userTelephone = Nothing
, userMobile = Nothing , userMobile = Nothing
, userTelephone = Nothing
, userCompanyPersonalNumber = Nothing , userCompanyPersonalNumber = Nothing
, userCompanyDepartment = Nothing , userCompanyDepartment = Nothing
} }

View File

@ -128,6 +128,10 @@ instance Arbitrary User where
userNotificationSettings <- arbitrary userNotificationSettings <- arbitrary
userCsvOptions <- arbitrary userCsvOptions <- arbitrary
userShowSex <- arbitrary userShowSex <- arbitrary
userMobile <- fmap pack . assertM' (not . null) <$> listOf (elements $ [' ', '+', '-', '/', '_'] ++ ['0'..'9'])
userTelephone <- fmap pack . assertM' (not . null) <$> listOf (elements $ [' ', '+', '-', '/', '_'] ++ ['0'..'9'])
userCompanyPersonalNumber <- fmap pack . assertM' (not . null) <$> listOf (elements ['0'..'9'])
userCompanyDepartment <- arbitrary
userCreated <- arbitrary userCreated <- arbitrary
userLastLdapSynchronisation <- arbitrary userLastLdapSynchronisation <- arbitrary

View File

@ -43,3 +43,7 @@ fakeUser adjUser = adjUser User{..}
userCreated = unsafePerformIO getCurrentTime userCreated = unsafePerformIO getCurrentTime
userLastLdapSynchronisation = Nothing userLastLdapSynchronisation = Nothing
userLdapPrimaryKey = Nothing userLdapPrimaryKey = Nothing
userMobile = Nothing
userTelephone = Nothing
userCompanyPersonalNumber = Nothing
userCompanyDepartment = Nothing