Misc testing improvements (#805)

* made dummy data more consistent; not an option

* fixed variable dropping issue crashing actix (?)

* removed scopes specific tests, removed schedule tests

* team routes use api

* removed printlns, fmt clippy prepare
This commit is contained in:
Wyatt Verchere
2023-12-20 11:46:53 -08:00
committed by GitHub
parent d59c522f7f
commit 60c535e861
39 changed files with 1775 additions and 1436 deletions

View File

@@ -59,8 +59,8 @@ pub async fn get_user_projects_after_deleting_project_shows_removal() {
#[actix_rt::test]
pub async fn get_user_projects_after_joining_team_shows_team_projects() {
with_test_environment_all(None, |test_env| async move {
let alpha_team_id = &test_env.dummy.as_ref().unwrap().project_alpha.team_id;
let alpha_project_id = &test_env.dummy.as_ref().unwrap().project_alpha.project_id;
let alpha_team_id = &test_env.dummy.project_alpha.team_id;
let alpha_project_id = &test_env.dummy.project_alpha.project_id;
let api = test_env.api;
api.get_user_projects_deserialized_common(FRIEND_USER_ID, FRIEND_USER_PAT)
.await;
@@ -82,8 +82,8 @@ pub async fn get_user_projects_after_joining_team_shows_team_projects() {
#[actix_rt::test]
pub async fn get_user_projects_after_leaving_team_shows_no_team_projects() {
with_test_environment_all(None, |test_env| async move {
let alpha_team_id = &test_env.dummy.as_ref().unwrap().project_alpha.team_id;
let alpha_project_id = &test_env.dummy.as_ref().unwrap().project_alpha.project_id;
let alpha_team_id = &test_env.dummy.project_alpha.team_id;
let alpha_project_id = &test_env.dummy.project_alpha.project_id;
let api = test_env.api;
api.add_user_to_team(alpha_team_id, FRIEND_USER_ID, None, None, USER_USER_PAT)
.await;