summaryrefslogtreecommitdiff
path: root/src/bookmarks/test/test_bookmarkstreemodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bookmarks/test/test_bookmarkstreemodel.cpp')
-rw-r--r--src/bookmarks/test/test_bookmarkstreemodel.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/bookmarks/test/test_bookmarkstreemodel.cpp b/src/bookmarks/test/test_bookmarkstreemodel.cpp
new file mode 100644
index 00000000..febd4cd4
--- /dev/null
+++ b/src/bookmarks/test/test_bookmarkstreemodel.cpp
@@ -0,0 +1,25 @@
+#include <QFile>
+#include <QStandardPaths>
+#include <gtest/gtest.h>
+
+#include "../bookmarkstreemodel.hpp"
+
+// clazy:excludeall=non-pod-global-static
+
+namespace {
+TEST(bookmarks, QStandardPaths)
+{
+ const auto file = QStandardPaths::locate(QStandardPaths::AppLocalDataLocation, QString::fromLatin1("bookmarks.xbel"));
+ EXPECT_TRUE(file.isEmpty()) << qUtf8Printable(file);
+}
+
+TEST(bookmarks, BookmarksTreeModel)
+{
+ BookmarksTreeModel model;
+ QFile f("bookmarks.xbel");
+ ASSERT_TRUE(f.open(QIODevice::ReadOnly | QIODevice::Text));
+
+ EXPECT_TRUE(model.load(&f).isEmpty());
+ f.close();
+}
+} // namespace