This commit is contained in:
phiresky 2024-07-15 18:47:55 +02:00
parent ec859fe148
commit c32d05c54e

View file

@ -221,6 +221,8 @@ impl<T: DataSource> CommunityInboxCollector<T> {
} }
#[cfg(test)] #[cfg(test)]
#[allow(clippy::unwrap_used)]
#[allow(clippy::indexing_slicing)]
mod tests { mod tests {
use super::*; use super::*;
use lemmy_db_schema::{ use lemmy_db_schema::{
@ -330,11 +332,15 @@ mod tests {
Ok(vec![ Ok(vec![
( (
community_id, community_id,
Url::parse("https://follower1.example.com/inbox").unwrap().into(), Url::parse("https://follower1.example.com/inbox")
.unwrap()
.into(),
), ),
( (
community_id, community_id,
Url::parse("https://follower2.example.com/inbox").unwrap().into(), Url::parse("https://follower2.example.com/inbox")
.unwrap()
.into(),
), ),
]) ])
}); });
@ -440,7 +446,9 @@ mod tests {
.return_once(move |_, _| { .return_once(move |_, _| {
Ok(vec![( Ok(vec![(
community_id, community_id,
Url::parse("https://follower.example.com/inbox").unwrap().into(), Url::parse("https://follower.example.com/inbox")
.unwrap()
.into(),
)]) )])
}); });
@ -496,17 +504,23 @@ mod tests {
Ok(vec![ Ok(vec![
( (
community_id1, community_id1,
Url::parse("https://follower1.example.com/inbox").unwrap().into(), Url::parse("https://follower1.example.com/inbox")
.unwrap()
.into(),
), ),
( (
community_id2, community_id2,
Url::parse("https://follower2.example.com/inbox").unwrap().into(), Url::parse("https://follower2.example.com/inbox")
.unwrap()
.into(),
), ),
]) ])
} else { } else {
Ok(vec![( Ok(vec![(
community_id3, community_id3,
Url::parse("https://follower3.example.com/inbox").unwrap().into(), Url::parse("https://follower3.example.com/inbox")
.unwrap()
.into(),
)]) )])
} }
}); });