Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSami Vänttinen <sami.vanttinen@protonmail.com>2019-01-30 17:48:22 +0300
committerJonathan White <support@dmapps.us>2019-01-30 17:48:22 +0300
commit891f67a1cdbd88c4ff9d1f61fd82d1aff2a9d9a4 (patch)
tree81c73f376dadc651a85095607abb51278016c316 /tests/TestGroup.cpp
parent779b529da2f9c3d7204dcf1a32bf07feedc0d5aa (diff)
Select group when adding credentials from browser extension (#2637)
Diffstat (limited to 'tests/TestGroup.cpp')
-rw-r--r--tests/TestGroup.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/TestGroup.cpp b/tests/TestGroup.cpp
index 7abb808d1..6ea43b105 100644
--- a/tests/TestGroup.cpp
+++ b/tests/TestGroup.cpp
@@ -766,3 +766,35 @@ void TestGroup::testAddEntryWithPath()
delete db;
}
+
+void TestGroup::testIsRecycled()
+{
+ Database* db = new Database();
+ db->rootGroup()->createRecycleBin();
+
+ Group* group1 = new Group();
+ group1->setName("group1");
+ group1->setParent(db->rootGroup());
+
+ Group* group2 = new Group();
+ group2->setName("group2");
+ group2->setParent(db->rootGroup());
+
+ Group* group3 = new Group();
+ group3->setName("group3");
+ group3->setParent(group2);
+
+ Group* group4 = new Group();
+ group4->setName("group4");
+ group4->setParent(db->rootGroup());
+
+ db->recycleGroup(group2);
+
+ QVERIFY(!group1->isRecycled());
+ QVERIFY(group2->isRecycled());
+ QVERIFY(group3->isRecycled());
+ QVERIFY(!group4->isRecycled());
+
+ db->recycleGroup(group4);
+ QVERIFY(group4->isRecycled());
+}