summaryrefslogtreecommitdiff
path: root/src/bookmarks/test/test_bookmarkstreemodel.cpp
blob: febd4cd491868229ee4d3aa8879ad035b58b8d0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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