Enforce that group/entry uuid is set when writing a database.

This commit is contained in:
Felix Geyer 2011-12-27 15:47:06 +01:00
parent 4ebcd53801
commit bce46c5ece
5 changed files with 15 additions and 0 deletions

View file

@ -45,6 +45,10 @@ void TestKeePass2Writer::initTestCase()
entry->addAttribute("test", "protectedTest", true);
QVERIFY(entry->isAttributeProtected("test"));
entry->setGroup(group);
Group* groupNew = new Group();
groupNew->setUuid(Uuid::random());
groupNew->setName("TESTGROUP");
groupNew->setParent(group);
QBuffer buffer;
buffer.open(QBuffer::ReadWrite);
@ -63,6 +67,7 @@ void TestKeePass2Writer::testBasic()
{
QCOMPARE(m_dbTest->metadata()->name(), m_dbOrg->metadata()->name());
QVERIFY(m_dbTest->rootGroup());
QCOMPARE(m_dbTest->rootGroup()->children()[0]->name(), m_dbOrg->rootGroup()->children()[0]->name());
}
void TestKeePass2Writer::testProtectedAttributes()