1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

PasswordBackendTest: Add more checks to prevent crashes on fail

This commit is contained in:
David Rosca 2015-10-09 11:26:56 +02:00
parent 7b2575f809
commit 2b05641430

View File

@ -100,6 +100,7 @@ void PasswordBackendTest::storeTest()
reloadBackend();
// Check entry retrieved from backend engine
QVERIFY(!m_backend->getEntries(QUrl("org.qupzilla.google.com")).isEmpty());
stored = m_backend->getEntries(QUrl("org.qupzilla.google.com")).first();
QVERIFY(compareEntries(stored, entry) == true);
@ -199,8 +200,10 @@ void PasswordBackendTest::updateLastUsedTest()
entry.username.append("s");
m_backend->addEntry(entry);
QVERIFY(!m_backend->getEntries(QUrl("org.qupzilla.google.com")).isEmpty());
QVERIFY(compareEntries(entry, m_backend->getEntries(QUrl("org.qupzilla.google.com")).first()));
reloadBackend();
QVERIFY(!m_backend->getEntries(QUrl("org.qupzilla.google.com")).isEmpty());
QVERIFY(compareEntries(entry, m_backend->getEntries(QUrl("org.qupzilla.google.com")).first()));
m_backend->removeEntry(m_backend->getEntries(QUrl("org.qupzilla.google.com")).first());