]> code.delx.au - offlineimap/blobdiff - testsrc/TestParser.hs
Sanified the return type of greeting
[offlineimap] / testsrc / TestParser.hs
index 3e61eb55e933f4742587ae065a6cd750e1c5df0f..5735042ab2c6d73fbed578eb4e9f4572e18e1ac8 100644 (file)
@@ -94,18 +94,18 @@ prop_greeting_bye :: String -> Property
 prop_greeting_bye s =
     isValidAtom s && head s /= '[' ==>
     p greeting ("* BYE " ++ s) @?=
-      (Just $ Left $ RespText Nothing s)
+      (Just $ (AUTHBYE, RespText Nothing s))
 
 prop_greeting_auth :: String -> Property
 prop_greeting_auth s =
     isValidAtom s && head s /= '[' ==>
     p' greeting ("* OK " ++ s) @?=
-      (Right $ Right $ (AUTHOK, RespText Nothing s))
+      (Right $ (AUTHOK, RespText Nothing s))
 
 prop_greeting_courier :: Result
 prop_greeting_courier =
     p greeting courierStr @?=
-      (Just $ Right $ (AUTHOK, RespText (Just code) text))
+      (Just $ (AUTHOK, RespText (Just code) text))
     where courierStr = "* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION] Courier-IMAP ready. See COPYING for distribution information."
           code = "CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION"
           text = "Courier-IMAP ready. See COPYING for distribution information."