fmt
Some checks failed
CI / Check / Test / Build (push) Has been cancelled

This commit is contained in:
2026-05-13 23:38:57 +02:00
parent 7415b91e23
commit 19171806b9
142 changed files with 4140 additions and 2025 deletions

View File

@@ -14,7 +14,14 @@ async fn test_pool() -> SqlitePool {
async fn add_announce_stores_and_counts() {
let pool = test_pool().await;
let repo = SqliteFederationRepository::new(pool);
repo.add_announce("https://remote/ann/1", "https://local/r/1", "https://remote/u/1", Utc::now()).await.unwrap();
repo.add_announce(
"https://remote/ann/1",
"https://local/r/1",
"https://remote/u/1",
Utc::now(),
)
.await
.unwrap();
assert_eq!(repo.count_announces("https://local/r/1").await.unwrap(), 1);
}
@@ -22,8 +29,22 @@ async fn add_announce_stores_and_counts() {
async fn duplicate_announce_is_ignored() {
let pool = test_pool().await;
let repo = SqliteFederationRepository::new(pool);
repo.add_announce("https://remote/ann/1", "https://local/r/1", "https://remote/u/1", Utc::now()).await.unwrap();
repo.add_announce("https://remote/ann/1", "https://local/r/1", "https://remote/u/1", Utc::now()).await.unwrap();
repo.add_announce(
"https://remote/ann/1",
"https://local/r/1",
"https://remote/u/1",
Utc::now(),
)
.await
.unwrap();
repo.add_announce(
"https://remote/ann/1",
"https://local/r/1",
"https://remote/u/1",
Utc::now(),
)
.await
.unwrap();
assert_eq!(repo.count_announces("https://local/r/1").await.unwrap(), 1);
}