This commit is contained in:
Felix Ableitner 2024-11-12 10:57:11 +01:00
parent c8098196a7
commit 0337816803

View file

@ -622,8 +622,11 @@ mod tests {
LocalUserLanguage::update(pool, test_langs2, local_user.id).await?; LocalUserLanguage::update(pool, test_langs2, local_user.id).await?;
// no overlap in user/community languages, so defaults to undetermined // no overlap in user/community languages, so defaults to undetermined
let def1 = default_post_language(pool, None, community.id, local_user.id).await?; let def1 = default_post_language(pool, None, community.id, local_user.id).await;
assert_eq!(UNDETERMINED_ID, def1); assert_eq!(
Some(LemmyErrorType::LanguageNotAllowed),
def1.err().map(|e| e.error_type)
);
let ru = Language::read_id_from_code(pool, "ru").await?; let ru = Language::read_id_from_code(pool, "ru").await?;
let test_langs3 = vec![ let test_langs3 = vec![