fix(build): adjust user tests for new fields
This commit is contained in:
parent
b38a89eece
commit
7141cccbe2
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user