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>
Current Time #{show currtime}
<p>
Compile Time #{show comptime}
Compile Time #{comptime}
$maybe ctime <- readMay comptime
<p>
Build is #{show $ ddays ctime currtime} days old

View File

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

View File

@ -128,6 +128,10 @@ instance Arbitrary User where
userNotificationSettings <- arbitrary
userCsvOptions <- 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
userLastLdapSynchronisation <- arbitrary

View File

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