Prepare RuleGel 1.0

This commit is contained in:
2026-05-24 22:06:15 +03:00
parent 1adfc1fa0c
commit 16e86fb9d5
18 changed files with 413 additions and 6 deletions
+9
View File
@@ -49,6 +49,15 @@ void main() {
expect(postMatchesRequestedTags(post, ['touhou']), isTrue);
expect(postMatchesRequestedTags(post, ['touhou', 'cirno']), isFalse);
});
test('hidden post keys are filtered locally', () {
final post = _post(tags: ['touhou']);
final settings = AppSettings.defaults.copyWith(
hiddenPostKeys: [post.cacheKey],
);
expect(postPassesTagFilters(post, settings), isFalse);
});
});
}
+3
View File
@@ -167,6 +167,7 @@ void main() {
blacklistedTags: ['blocked'],
whitelistedTags: ['allowed'],
smartBlacklistRules: ['provider:e621 score:<10'],
hiddenPostKeys: ['provider:post'],
),
);
@@ -178,6 +179,8 @@ void main() {
expect(exported.data, contains('"allowed"'));
expect(exported.data, contains('"smartBlacklistRules"'));
expect(exported.data, contains('provider:e621 score:<10'));
expect(exported.data, contains('"hiddenPostKeys"'));
expect(exported.data, contains('"provider:post"'));
});
test('cache service prunes to max item count', () async {