user-language-signup
Felix Ableitner 2024-03-21 16:38:09 +01:00
parent 9c48bce483
commit 47105a9c3d
1 changed files with 2 additions and 9 deletions

View File

@ -523,10 +523,6 @@ mod tests {
let pool = &mut pool.into(); let pool = &mut pool.into();
let (site, instance) = create_test_site(pool).await; let (site, instance) = create_test_site(pool).await;
let mut test_langs = test_langs1(pool).await;
SiteLanguage::update(pool, test_langs.clone(), &site)
.await
.unwrap();
let person_form = PersonInsertForm::builder() let person_form = PersonInsertForm::builder()
.name("my test person".to_string()) .name("my test person".to_string())
@ -542,11 +538,8 @@ mod tests {
let local_user = LocalUser::create(pool, &local_user_form).await.unwrap(); let local_user = LocalUser::create(pool, &local_user_form).await.unwrap();
let local_user_langs1 = LocalUserLanguage::read(pool, local_user.id).await.unwrap(); let local_user_langs1 = LocalUserLanguage::read(pool, local_user.id).await.unwrap();
// new user should be initialized with site languages and undetermined // new user should be initialized with all languages
//test_langs.push(UNDETERMINED_ID); assert_eq!(0, local_user_langs1.len());
//test_langs.sort();
test_langs.insert(0, UNDETERMINED_ID);
assert_eq!(test_langs, local_user_langs1);
// update user languages // update user languages
let test_langs2 = test_langs2(pool).await; let test_langs2 = test_langs2(pool).await;