mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-15 09:46:26 -04:00
Enforce that group/entry uuid is set when writing a database.
This commit is contained in:
parent
4ebcd53801
commit
bce46c5ece
5 changed files with 15 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue