From c62ffe9335e1c0480c1e7c1fd20e258a4c40dca1 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Tue, 1 Mar 2016 11:59:39 +0000 Subject: [PATCH] Added unit tests for checking the invalid SSL certificate. --- source/tests/xestiacalendar_caldav.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/tests/xestiacalendar_caldav.h b/source/tests/xestiacalendar_caldav.h index aaca024..45da6f7 100644 --- a/source/tests/xestiacalendar_caldav.h +++ b/source/tests/xestiacalendar_caldav.h @@ -227,6 +227,12 @@ TEST(CalDAV, BasicTests){ // Verify that the connection had failed. (with an invalid // SSL certificate). + ConnResult = CalDAVInvalidSSL.Connect(); + + ASSERT_EQ(CALDAVQUERYRESULT_SERVERERROR, ConnResult.Result); + ASSERT_EQ(0, ConnResult.HTTPCode); + ASSERT_EQ(CURLE_SSL_CACERT, ConnResult.Code); + // (*nix version) Setup an inital connection on a server where // a timeout occurs. -- 2.39.5