mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-06-09 00:49:21 +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>
58 lines
1.6 KiB
Rust
58 lines
1.6 KiB
Rust
pub mod announce;
|
|
pub mod collection_add;
|
|
pub mod collection_remove;
|
|
pub mod lock_page;
|
|
pub mod report;
|
|
pub mod update;
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
#![allow(clippy::unwrap_used)]
|
|
#![allow(clippy::indexing_slicing)]
|
|
|
|
use crate::protocol::{
|
|
activities::community::{
|
|
announce::AnnounceActivity,
|
|
collection_add::CollectionAdd,
|
|
collection_remove::CollectionRemove,
|
|
lock_page::{LockPage, UndoLockPage},
|
|
report::Report,
|
|
update::UpdateCommunity,
|
|
},
|
|
tests::test_parse_lemmy_item,
|
|
};
|
|
|
|
#[test]
|
|
fn test_parse_lemmy_community_activities() {
|
|
test_parse_lemmy_item::<AnnounceActivity>(
|
|
"assets/lemmy/activities/community/announce_create_page.json",
|
|
)
|
|
.unwrap();
|
|
|
|
test_parse_lemmy_item::<CollectionAdd>("assets/lemmy/activities/community/add_mod.json")
|
|
.unwrap();
|
|
test_parse_lemmy_item::<CollectionRemove>("assets/lemmy/activities/community/remove_mod.json")
|
|
.unwrap();
|
|
|
|
test_parse_lemmy_item::<CollectionAdd>(
|
|
"assets/lemmy/activities/community/add_featured_post.json",
|
|
)
|
|
.unwrap();
|
|
test_parse_lemmy_item::<CollectionRemove>(
|
|
"assets/lemmy/activities/community/remove_featured_post.json",
|
|
)
|
|
.unwrap();
|
|
|
|
test_parse_lemmy_item::<LockPage>("assets/lemmy/activities/community/lock_page.json").unwrap();
|
|
test_parse_lemmy_item::<UndoLockPage>("assets/lemmy/activities/community/undo_lock_page.json")
|
|
.unwrap();
|
|
|
|
test_parse_lemmy_item::<UpdateCommunity>(
|
|
"assets/lemmy/activities/community/update_community.json",
|
|
)
|
|
.unwrap();
|
|
|
|
test_parse_lemmy_item::<Report>("assets/lemmy/activities/community/report_page.json").unwrap();
|
|
}
|
|
}
|