fix: tests
This commit is contained in:
parent
56c23ebd33
commit
018d26f4a1
@ -118,6 +118,7 @@ fillDb = do
|
||||
, userNotificationSettings = def
|
||||
, userCreated = now
|
||||
, userLastLdapSynchronisation = Nothing
|
||||
, userLdapPrimaryKey = Nothing
|
||||
, userCsvOptions = def { csvFormat = csvPreset # CsvPresetRFC }
|
||||
, userSex = Just SexMale
|
||||
, userShowSex = userDefaultShowSex
|
||||
@ -146,6 +147,7 @@ fillDb = do
|
||||
, userNotificationSettings = def
|
||||
, userCreated = now
|
||||
, userLastLdapSynchronisation = Nothing
|
||||
, userLdapPrimaryKey = Nothing
|
||||
, userCsvOptions = def { csvFormat = csvPreset # CsvPresetExcel }
|
||||
, userSex = Just SexMale
|
||||
, userShowSex = userDefaultShowSex
|
||||
@ -174,6 +176,7 @@ fillDb = do
|
||||
, userNotificationSettings = def
|
||||
, userCreated = now
|
||||
, userLastLdapSynchronisation = Nothing
|
||||
, userLdapPrimaryKey = Nothing
|
||||
, userSex = Just SexMale
|
||||
, userCsvOptions = def
|
||||
, userShowSex = userDefaultShowSex
|
||||
@ -202,6 +205,7 @@ fillDb = do
|
||||
, userNotificationSettings = def
|
||||
, userCreated = now
|
||||
, userLastLdapSynchronisation = Nothing
|
||||
, userLdapPrimaryKey = Nothing
|
||||
, userCsvOptions = def
|
||||
, userSex = Just SexMale
|
||||
, userShowSex = userDefaultShowSex
|
||||
@ -230,6 +234,7 @@ fillDb = do
|
||||
, userNotificationSettings = def
|
||||
, userCreated = now
|
||||
, userLastLdapSynchronisation = Nothing
|
||||
, userLdapPrimaryKey = Nothing
|
||||
, userCsvOptions = def
|
||||
, userSex = Just SexNotApplicable
|
||||
, userShowSex = userDefaultShowSex
|
||||
@ -258,6 +263,7 @@ fillDb = do
|
||||
, userNotificationSettings = def
|
||||
, userCreated = now
|
||||
, userLastLdapSynchronisation = Nothing
|
||||
, userLdapPrimaryKey = Nothing
|
||||
, userCsvOptions = def
|
||||
, userSex = Just SexFemale
|
||||
, userShowSex = userDefaultShowSex
|
||||
@ -316,6 +322,7 @@ fillDb = do
|
||||
, userNotificationSettings = def
|
||||
, userCreated = now
|
||||
, userLastLdapSynchronisation = Nothing
|
||||
, userLdapPrimaryKey = Nothing
|
||||
, userCsvOptions = def
|
||||
, userSex = Nothing
|
||||
, userShowSex = userDefaultShowSex
|
||||
|
||||
@ -126,6 +126,13 @@ instance Arbitrary User where
|
||||
|
||||
userCreated <- arbitrary
|
||||
userLastLdapSynchronisation <- arbitrary
|
||||
userLdapPrimaryKey <- oneof
|
||||
[ pure Nothing
|
||||
, fmap Just $ pack <$> oneof
|
||||
[ getPrintableString <$> arbitrary
|
||||
, on (\l d -> l <> "@" <> d) getPrintableString <$> arbitrary <*> arbitrary
|
||||
]
|
||||
]
|
||||
|
||||
return User{..}
|
||||
shrink = genericShrink
|
||||
|
||||
@ -42,3 +42,4 @@ fakeUser adjUser = adjUser User{..}
|
||||
userNotificationSettings = def
|
||||
userCreated = unsafePerformIO getCurrentTime
|
||||
userLastLdapSynchronisation = Nothing
|
||||
userLdapPrimaryKey = Nothing
|
||||
|
||||
Reference in New Issue
Block a user