test(gpodder): implement full test suite

* these tests were partially generated using AI, and reviewed by me
* there are 4 failing tests related to subscription counts; this is
  known functionality that still needs to be implemented
This commit is contained in:
Jef Roosens 2026-05-06 21:43:48 +02:00
parent 8498fe9661
commit c2e0c4d091
Signed by: Jef Roosens
GPG key ID: 21FD3D77D56BAF49
11 changed files with 1813 additions and 4 deletions

View file

@ -372,3 +372,68 @@ impl gpodder::GpodderSubscriptionStore for SqliteRepository {
.map_err(AuthErr::from)
}
}
#[cfg(test)]
mod tests {
use crate::SqliteRepository;
#[test]
fn test_set_subscriptions_for_device() {
let store = SqliteRepository::in_memory().unwrap();
gpodder_test::subscription::test_set_subscriptions_for_device(store);
}
#[test]
fn test_set_subscriptions_replaces() {
let store = SqliteRepository::in_memory().unwrap();
gpodder_test::subscription::test_set_subscriptions_replaces(store);
}
#[test]
fn test_update_subscriptions_add() {
let store = SqliteRepository::in_memory().unwrap();
gpodder_test::subscription::test_update_subscriptions_add(store);
}
#[test]
fn test_update_subscriptions_remove() {
let store = SqliteRepository::in_memory().unwrap();
gpodder_test::subscription::test_update_subscriptions_remove(store);
}
#[test]
fn test_update_subscriptions_add_and_remove() {
let store = SqliteRepository::in_memory().unwrap();
gpodder_test::subscription::test_update_subscriptions_add_and_remove(store);
}
#[test]
fn test_subscriptions_for_user() {
let store = SqliteRepository::in_memory().unwrap();
gpodder_test::subscription::test_subscriptions_for_user(store);
}
#[test]
fn test_subscription_updates_since() {
let store = SqliteRepository::in_memory().unwrap();
gpodder_test::subscription::test_subscription_updates_since(store);
}
#[test]
fn test_subscription_updates_add_and_remove() {
let store = SqliteRepository::in_memory().unwrap();
gpodder_test::subscription::test_subscription_updates_add_and_remove(store);
}
#[test]
fn test_subscription_propagation_in_sync_group() {
let store = SqliteRepository::in_memory().unwrap();
gpodder_test::subscription::test_subscription_propagation_in_sync_group(store);
}
#[test]
fn test_subscription_isolation_between_users() {
let store = SqliteRepository::in_memory().unwrap();
gpodder_test::subscription::test_subscription_isolation_between_users(store);
}
}