You've already forked AstralRinth
forked from didirus/AstralRinth
Tests 3 restructure (#754)
* moved files * moved files * initial v3 additions * moves req data * tests passing, restructuring, remove v2 * fmt; clippy; prepare * merge conflicts + issues * merge conflict, fmt, clippy, prepare * revs * fixed failing test * fixed tests
This commit is contained in:
@@ -3,7 +3,8 @@ use common::{
|
||||
environment::with_test_environment,
|
||||
};
|
||||
|
||||
use crate::common::{dummy_data::TestFile, request_data::get_public_project_creation_data};
|
||||
use crate::common::api_v3::request_data::get_public_project_creation_data;
|
||||
use common::dummy_data::TestFile;
|
||||
|
||||
mod common;
|
||||
|
||||
@@ -19,7 +20,7 @@ mod common;
|
||||
#[actix_rt::test]
|
||||
pub async fn get_user_projects_after_creating_project_returns_new_project() {
|
||||
with_test_environment(|test_env| async move {
|
||||
let api = test_env.v2;
|
||||
let api = test_env.v3;
|
||||
api.get_user_projects_deserialized(USER_USER_ID, USER_USER_PAT)
|
||||
.await;
|
||||
|
||||
@@ -41,7 +42,7 @@ pub async fn get_user_projects_after_creating_project_returns_new_project() {
|
||||
#[actix_rt::test]
|
||||
pub async fn get_user_projects_after_deleting_project_shows_removal() {
|
||||
with_test_environment(|test_env| async move {
|
||||
let api = test_env.v2;
|
||||
let api = test_env.v3;
|
||||
let (project, _) = api
|
||||
.add_public_project(
|
||||
get_public_project_creation_data("iota", Some(TestFile::BasicMod)),
|
||||
@@ -67,7 +68,7 @@ pub async fn get_user_projects_after_joining_team_shows_team_projects() {
|
||||
with_test_environment(|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 api = test_env.v2;
|
||||
let api = test_env.v3;
|
||||
api.get_user_projects_deserialized(FRIEND_USER_ID, FRIEND_USER_PAT)
|
||||
.await;
|
||||
|
||||
@@ -90,7 +91,7 @@ pub async fn get_user_projects_after_leaving_team_shows_no_team_projects() {
|
||||
with_test_environment(|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 api = test_env.v2;
|
||||
let api = test_env.v3;
|
||||
api.add_user_to_team(alpha_team_id, FRIEND_USER_ID, None, None, USER_USER_PAT)
|
||||
.await;
|
||||
api.join_team(alpha_team_id, FRIEND_USER_PAT).await;
|
||||
|
||||
Reference in New Issue
Block a user