This commit is contained in:
Felix Ableitner 2024-09-23 12:29:17 +02:00
parent d106144ac6
commit 525cb710b1

View file

@ -417,6 +417,7 @@ impl<'a> CommentQuery<'a> {
#[cfg(test)] #[cfg(test)]
#[allow(clippy::indexing_slicing)] #[allow(clippy::indexing_slicing)]
#[allow(clippy::unwrap_used)]
mod tests { mod tests {
use crate::{ use crate::{
@ -461,7 +462,7 @@ mod tests {
CommunityVisibility, CommunityVisibility,
SubscribedType, SubscribedType,
}; };
use lemmy_utils::{error::LemmyResult, LemmyErrorType}; use lemmy_utils::error::LemmyResult;
use pretty_assertions::assert_eq; use pretty_assertions::assert_eq;
use serial_test::serial; use serial_test::serial;
@ -556,7 +557,7 @@ mod tests {
let polish_id = Language::read_id_from_code(pool, Some("pl")) let polish_id = Language::read_id_from_code(pool, Some("pl"))
.await? .await?
.ok_or(LemmyErrorType::LanguageNotAllowed)?; .unwrap();
let comment_form_4 = CommentInsertForm::builder() let comment_form_4 = CommentInsertForm::builder()
.content("Comment 4".into()) .content("Comment 4".into())
.creator_id(inserted_timmy_person.id) .creator_id(inserted_timmy_person.id)
@ -817,7 +818,7 @@ mod tests {
// change user lang to finnish, should only show one post in finnish and one undetermined // change user lang to finnish, should only show one post in finnish and one undetermined
let finnish_id = Language::read_id_from_code(pool, Some("fi")) let finnish_id = Language::read_id_from_code(pool, Some("fi"))
.await? .await?
.ok_or(LemmyErrorType::LanguageNotAllowed)?; .unwrap();
LocalUserLanguage::update( LocalUserLanguage::update(
pool, pool,
vec![finnish_id], vec![finnish_id],