TestSelfSignedCertificate: Check that both "cert" and "key" are not empty

It was a copy/paste error.
This commit is contained in:
davidebeatrici 2018-01-25 01:10:14 +01:00
parent d47f2e342c
commit e017c4063f

View File

@ -34,12 +34,12 @@ void TestSelfSignedCertificate::exerciseClientCert() {
bool ok = SelfSignedCertificate::generateMumbleCertificate(QLatin1String("Test"), QLatin1String("test@test.test"), cert, key);
QCOMPARE(ok, true);
QCOMPARE(cert.isNull(), false);
QCOMPARE(cert.isNull(), false);
QCOMPARE(key.isNull(), false);
ok = SelfSignedCertificate::generateMumbleCertificate(QString(), QString(), cert, key);
QCOMPARE(ok, false);
QCOMPARE(cert.isNull(), true);
QCOMPARE(cert.isNull(), true);
QCOMPARE(key.isNull(), true);
}
void TestSelfSignedCertificate::exerciseServerCert() {
@ -49,7 +49,7 @@ void TestSelfSignedCertificate::exerciseServerCert() {
bool ok = SelfSignedCertificate::generateMurmurV2Certificate(cert, key);
QCOMPARE(ok, true);
QCOMPARE(cert.isNull(), false);
QCOMPARE(cert.isNull(), false);
QCOMPARE(key.isNull(), false);
}
QTEST_MAIN(TestSelfSignedCertificate)