blob: 1ddd238e7aebf4eec215a1026690ef7421e9f76d (
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
26
|
#define BOOST_TEST_MODULE TestBugs
#include <boost/test/unit_test.hpp>
#include "maintenance.h"
#include "mockDefs.h"
#include <cstdint>
#include <memory>
#include <mockDatabase.h>
BOOST_GLOBAL_FIXTURE(Maintenance);
BOOST_FIXTURE_TEST_SUITE(tp, TestClient)
BOOST_AUTO_TEST_CASE(importBugHtml)
{
const int64_t expectedBugCount = 34;
m->refreshBugs();
auto db = DB::MockDatabase::openConnectionTo("GentooBrowseAPI");
SQL_REQUIRE_EQUAL("SELECT COUNT(*) FROM gentoobrowse.bugs", int64_t, expectedBugCount);
#if DUMPDB
db->execute("COPY gentoobrowse.bugs TO '/tmp/bugs.tsv'");
#endif
}
BOOST_AUTO_TEST_SUITE_END();
|