aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2014-02-13 21:23:59 +0000
committerVincent Richard <[email protected]>2014-02-13 21:23:59 +0000
commitc860c273d388d8b1b2a94f6ce3457b9f6f3d53e9 (patch)
tree26cc788ac0dee6a4b449be21202520084db375d5 /tests
parentFixed problem when custom registered mechanism is used. (diff)
downloadvmime-c860c273d388d8b1b2a94f6ce3457b9f6f3d53e9.tar.gz
vmime-c860c273d388d8b1b2a94f6ce3457b9f6f3d53e9.zip
Added support for initial response in SASL authentication.
Diffstat (limited to 'tests')
-rw-r--r--tests/net/pop3/POP3CommandTest.cpp9
-rw-r--r--tests/net/smtp/SMTPCommandTest.cpp9
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/net/pop3/POP3CommandTest.cpp b/tests/net/pop3/POP3CommandTest.cpp
index 4733c96b..139e948b 100644
--- a/tests/net/pop3/POP3CommandTest.cpp
+++ b/tests/net/pop3/POP3CommandTest.cpp
@@ -39,6 +39,7 @@ VMIME_TEST_SUITE_BEGIN(POP3CommandTest)
VMIME_TEST(testCAPA)
VMIME_TEST(testNOOP)
VMIME_TEST(testAUTH)
+ VMIME_TEST(testAUTH_InitialResponse)
VMIME_TEST(testSTLS)
VMIME_TEST(testAPOP)
VMIME_TEST(testUSER)
@@ -97,6 +98,14 @@ VMIME_TEST_SUITE_BEGIN(POP3CommandTest)
VASSERT_EQ("Text", "AUTH saslmechanism", cmd->getText());
}
+ void testAUTH_InitialResponse()
+ {
+ vmime::shared_ptr <POP3Command> cmd = POP3Command::AUTH("saslmechanism", "initial-response");
+
+ VASSERT_NOT_NULL("Not null", cmd);
+ VASSERT_EQ("Text", "AUTH saslmechanism initial-response", cmd->getText());
+ }
+
void testSTLS()
{
vmime::shared_ptr <POP3Command> cmd = POP3Command::STLS();
diff --git a/tests/net/smtp/SMTPCommandTest.cpp b/tests/net/smtp/SMTPCommandTest.cpp
index 6d466865..9480948c 100644
--- a/tests/net/smtp/SMTPCommandTest.cpp
+++ b/tests/net/smtp/SMTPCommandTest.cpp
@@ -37,6 +37,7 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandTest)
VMIME_TEST(testHELO)
VMIME_TEST(testEHLO)
VMIME_TEST(testAUTH)
+ VMIME_TEST(testAUTH_InitialResponse)
VMIME_TEST(testSTARTTLS)
VMIME_TEST(testMAIL)
VMIME_TEST(testMAIL_Encoded)
@@ -95,6 +96,14 @@ VMIME_TEST_SUITE_BEGIN(SMTPCommandTest)
VASSERT_EQ("Text", "AUTH saslmechanism", cmd->getText());
}
+ void testAUTH_InitialResponse()
+ {
+ vmime::shared_ptr <SMTPCommand> cmd = SMTPCommand::AUTH("saslmechanism", "initial-response");
+
+ VASSERT_NOT_NULL("Not null", cmd);
+ VASSERT_EQ("Text", "AUTH saslmechanism initial-response", cmd->getText());
+ }
+
void testSTARTTLS()
{
vmime::shared_ptr <SMTPCommand> cmd = SMTPCommand::STARTTLS();