mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
PasswordBackendTest: Add more checks to prevent crashes on fail
This commit is contained in:
parent
7b2575f809
commit
2b05641430
|
@ -100,6 +100,7 @@ void PasswordBackendTest::storeTest()
|
||||||
reloadBackend();
|
reloadBackend();
|
||||||
|
|
||||||
// Check entry retrieved from backend engine
|
// 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();
|
stored = m_backend->getEntries(QUrl("org.qupzilla.google.com")).first();
|
||||||
QVERIFY(compareEntries(stored, entry) == true);
|
QVERIFY(compareEntries(stored, entry) == true);
|
||||||
|
|
||||||
|
@ -199,8 +200,10 @@ void PasswordBackendTest::updateLastUsedTest()
|
||||||
entry.username.append("s");
|
entry.username.append("s");
|
||||||
m_backend->addEntry(entry);
|
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()));
|
QVERIFY(compareEntries(entry, m_backend->getEntries(QUrl("org.qupzilla.google.com")).first()));
|
||||||
reloadBackend();
|
reloadBackend();
|
||||||
|
QVERIFY(!m_backend->getEntries(QUrl("org.qupzilla.google.com")).isEmpty());
|
||||||
QVERIFY(compareEntries(entry, m_backend->getEntries(QUrl("org.qupzilla.google.com")).first()));
|
QVERIFY(compareEntries(entry, m_backend->getEntries(QUrl("org.qupzilla.google.com")).first()));
|
||||||
|
|
||||||
m_backend->removeEntry(m_backend->getEntries(QUrl("org.qupzilla.google.com")).first());
|
m_backend->removeEntry(m_backend->getEntries(QUrl("org.qupzilla.google.com")).first());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user