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."