summaryrefslogtreecommitdiff
path: root/Omni/Task.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Omni/Task.hs')
-rw-r--r--Omni/Task.hs11
1 files changed, 10 insertions, 1 deletions
diff --git a/Omni/Task.hs b/Omni/Task.hs
index f3baf15..01b5ad9 100644
--- a/Omni/Task.hs
+++ b/Omni/Task.hs
@@ -366,7 +366,16 @@ unitTests =
-- Create a new child, it should get .4, not .2
child4 <- createTask "Child 4" WorkTask (Just (taskId parent)) Nothing P2 []
- taskId child4 Test.@?= taskId parent <> ".4"
+ taskId child4 Test.@?= taskId parent <> ".4",
+ Test.unit "task lookup is case insensitive" <| do
+ task <- createTask "Case sensitive" WorkTask Nothing Nothing P2 []
+ let tid = taskId task
+ upperTid = T.toUpper tid
+ tasks <- loadTasks
+ let found = findTask upperTid tasks
+ case found of
+ Just t -> taskId t Test.@?= tid
+ Nothing -> Test.assertFailure "Could not find task with upper case ID"
]
-- | Test CLI argument parsing to ensure docopt string matches actual usage