mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-01-11 20:45:53 +00:00
9256895635
* Try using drone cache plugin * Try another path * Include volume * Fix formatting * Include fmt * Exclude cargo dir from prettier * Don't override cargo * Just do check * Add cache key * Use different cache plugin * Add clippy * Try minio * Add quotes * Try adding secrets * Try again * Again * Use correct secret formation * Add back clippy * Use secret for the root bucket name * Try drone cache instead * Add region * Add path-style option * Include cargo clippy * Include everything again * Fix formatting * Don't run clippy twice * Add `allow` statements for tests to pass * Adjust endpoint to be a secret * Fix prettier * Merge & fix tests * Try to restart the woodpecker test * Change the ENV var name --------- Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
41 lines
1.3 KiB
Rust
41 lines
1.3 KiB
Rust
pub(crate) mod empty_outbox;
|
|
pub(crate) mod group_featured;
|
|
pub(crate) mod group_followers;
|
|
pub(crate) mod group_moderators;
|
|
pub(crate) mod group_outbox;
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
#![allow(clippy::unwrap_used)]
|
|
#![allow(clippy::indexing_slicing)]
|
|
|
|
use crate::protocol::{
|
|
collections::{
|
|
empty_outbox::EmptyOutbox,
|
|
group_featured::GroupFeatured,
|
|
group_followers::GroupFollowers,
|
|
group_moderators::GroupModerators,
|
|
group_outbox::GroupOutbox,
|
|
},
|
|
tests::{test_json, test_parse_lemmy_item},
|
|
};
|
|
|
|
#[test]
|
|
fn test_parse_lemmy_collections() {
|
|
test_parse_lemmy_item::<GroupFollowers>("assets/lemmy/collections/group_followers.json")
|
|
.unwrap();
|
|
let outbox =
|
|
test_parse_lemmy_item::<GroupOutbox>("assets/lemmy/collections/group_outbox.json").unwrap();
|
|
assert_eq!(outbox.ordered_items.len() as i32, outbox.total_items);
|
|
test_parse_lemmy_item::<GroupFeatured>("assets/lemmy/collections/group_featured_posts.json")
|
|
.unwrap();
|
|
test_parse_lemmy_item::<GroupModerators>("assets/lemmy/collections/group_moderators.json")
|
|
.unwrap();
|
|
test_parse_lemmy_item::<EmptyOutbox>("assets/lemmy/collections/person_outbox.json").unwrap();
|
|
}
|
|
|
|
#[test]
|
|
fn test_parse_mastodon_collections() {
|
|
test_json::<GroupFeatured>("assets/mastodon/collections/featured.json").unwrap();
|
|
}
|
|
}
|