Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
PIM Messagelib
Commits
3231c226
Commit
3231c226
authored
Jan 26, 2021
by
Sandro Knauß
🐝
Browse files
MessageCore/AutocryptStorage: Add tests for creation of basepath.
parent
5bba9d0d
Changes
2
Show whitespace changes
Inline
Side-by-side
messagecore/autotests/autocryptstoragetest.cpp
View file @
3231c226
...
...
@@ -142,3 +142,15 @@ void AutocryptStorageTest::test_deleteRecipient()
QCOMPARE
(
baseDir
.
exists
(
fileName
),
false
);
QCOMPARE
(
storage
->
getRecipient
(
addr
),
nullptr
);
}
void
AutocryptStorageTest
::
test_create_basedir
()
{
const
QByteArray
addr
(
"recipient@autocrypt.example"
);
const
QString
fileName
(
QStringLiteral
(
"recipient%40autocrypt.example.json"
));
auto
storage
=
AutocryptStorage
::
self
();
QVERIFY
(
storage
->
addRecipient
(
addr
));
baseDir
.
removeRecursively
();
QCOMPARE
(
baseDir
.
exists
(),
false
);
storage
->
save
();
QCOMPARE
(
baseDir
.
exists
(
fileName
),
true
);
}
messagecore/autotests/autocryptstoragetest.h
View file @
3231c226
...
...
@@ -22,6 +22,7 @@ private Q_SLOTS:
void
test_store
();
void
test_addRecipient
();
void
test_deleteRecipient
();
void
test_create_basedir
();
private:
QDir
baseDir
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment