summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoobrowse-api/service/sql/portage/getUserTrackedRecentVersions.sql2
-rw-r--r--gentoobrowse-api/unittests/testPortage.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/gentoobrowse-api/service/sql/portage/getUserTrackedRecentVersions.sql b/gentoobrowse-api/service/sql/portage/getUserTrackedRecentVersions.sql
index 1f59500..6b9a5a1 100644
--- a/gentoobrowse-api/service/sql/portage/getUserTrackedRecentVersions.sql
+++ b/gentoobrowse-api/service/sql/portage/getUserTrackedRecentVersions.sql
@@ -2,5 +2,5 @@ SELECT e.ebuildid, e.packageid, e.repoid, e.version, e.slot, e.firstseen, e.modd
FROM gentoobrowse.user_packages up, gentoobrowse.ebuilds e
WHERE up.userid = ?
AND up.packageid = e.packageid
-ORDER BY e.firstseen
+ORDER BY e.firstseen DESC
LIMIT ?
diff --git a/gentoobrowse-api/unittests/testPortage.cpp b/gentoobrowse-api/unittests/testPortage.cpp
index fdfd1f9..588ad8c 100644
--- a/gentoobrowse-api/unittests/testPortage.cpp
+++ b/gentoobrowse-api/unittests/testPortage.cpp
@@ -277,8 +277,10 @@ BOOST_AUTO_TEST_CASE( getUserTrackedRecentVersions )
{
auto ps = p->getUserTrackedRecentVersions(1, 4);
BOOST_REQUIRE_EQUAL(4, ps.size());
- BOOST_REQUIRE_EQUAL(55943, ps.front()->packageid);
+ BOOST_REQUIRE_EQUAL(49517, ps.front()->packageid);
+ BOOST_REQUIRE_EQUAL("2015-12-02T19:12:42.627493", ps.front()->firstseen);
BOOST_REQUIRE_EQUAL(54144, ps.back()->packageid);
+ BOOST_REQUIRE_EQUAL("2015-10-17T15:00:13.238126", ps.back()->firstseen);
}
BOOST_AUTO_TEST_CASE( getPackageRuntimeDependencies )