Only display the type of tags that are actually in use in the filters button

This commit is contained in:
emeric
2020-11-13 13:43:36 +01:00
parent 6240ccf747
commit 3d692a33d4
5 changed files with 24 additions and 4 deletions
+6 -1
View File
@@ -228,7 +228,6 @@ testSingleCluster(Session& session)
{
auto transaction {session.createUniqueTransaction()};
auto clusters {Cluster::getAll(session)};
CHECK(clusters.size() == 1);
CHECK(clusters.front().id() == cluster.getId());
@@ -242,6 +241,10 @@ testSingleCluster(Session& session)
CHECK(clusterTypes.size() == 1);
CHECK(clusterTypes.front().id() == clusterType.getId());
clusterTypes = ClusterType::getAllUsed(session);
CHECK(clusterTypes.size() == 1);
CHECK(clusterTypes.front().id() == clusterType.getId());
clusterTypes = ClusterType::getAllOrphans(session);
CHECK(clusterTypes.empty());
}
@@ -253,6 +256,8 @@ testSingleCluster(Session& session)
auto clusterTypes {ClusterType::getAllOrphans(session)};
CHECK(clusterTypes.size() == 1);
CHECK(clusterTypes.front().id() == clusterType.getId());
CHECK(ClusterType::getAllUsed(session).empty());
}
}