Update Proj.hs
This commit is contained in:
parent
9fe11d317d
commit
4226a38603
6
Proj.hs
6
Proj.hs
@ -111,13 +111,13 @@ addNewDishes path = do
|
|||||||
testSuggestMeals :: Test
|
testSuggestMeals :: Test
|
||||||
testSuggestMeals =
|
testSuggestMeals =
|
||||||
TestList
|
TestList
|
||||||
[ "Test suggestMeals for empty dish list"
|
[ "Test suggestMeals for not exist list"
|
||||||
~: do
|
~: do
|
||||||
let csvFile = "empty.csv"
|
let csvFile = "empty.csv"
|
||||||
result <- tryJust (guard . isDoesNotExistError) $ readCSV csvFile
|
result <- tryJust (guard . isDoesNotExistError) $ readCSV csvFile
|
||||||
case result of
|
case result of
|
||||||
Left _ -> return () -- Test zakończy się powodzeniem, jeśli otrzymamy Left
|
Left _ -> return ()
|
||||||
Right _ -> assertFailure ("Test suggestMeals for empty dish list with file " ++ csvFile ++ ": should have failed to read CSV file"),
|
Right _ -> assertFailure ("Test suggestMeals for not exist list with file " ++ csvFile ++ ": should have failed to read CSV file"),
|
||||||
"Test suggestMeals for non-empty dish list"
|
"Test suggestMeals for non-empty dish list"
|
||||||
~: do
|
~: do
|
||||||
let csvFile = "baza.csv"
|
let csvFile = "baza.csv"
|
||||||
|
Loading…
Reference in New Issue
Block a user