fix(build): adjust user tests for new fields
This commit is contained in:
parent
b38a89eece
commit
7141cccbe2
@ -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
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -43,3 +43,7 @@ fakeUser adjUser = adjUser User{..}
|
||||
userCreated = unsafePerformIO getCurrentTime
|
||||
userLastLdapSynchronisation = Nothing
|
||||
userLdapPrimaryKey = Nothing
|
||||
userMobile = Nothing
|
||||
userTelephone = Nothing
|
||||
userCompanyPersonalNumber = Nothing
|
||||
userCompanyDepartment = Nothing
|
||||
|
||||
Reference in New Issue
Block a user