test: move application tests to tests/
test_support/test_helpers -> tests/support; watched_at unified w/ domain test_watched_at (2024-03-15). Kept inline: users::diary_filter tests (feed_sort_to_direction_all_variants, paged_user_filter_builds_correctly) - pub(super) helpers in private module. Dropped stale never-compiled users/tests/get_users.rs (old execute signature).
This commit is contained in:
@@ -21,7 +21,3 @@ pub async fn execute(deps: &GetPersonDeps, id: PersonId) -> Result<Option<Person
|
||||
}
|
||||
Ok(person)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "tests/get.rs"]
|
||||
mod tests;
|
||||
|
||||
@@ -19,7 +19,3 @@ pub async fn execute(deps: &GetPersonDeps, id: PersonId) -> Result<PersonCredits
|
||||
}
|
||||
Ok(credits)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "tests/get_credits.rs"]
|
||||
mod tests;
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
use domain::models::PersonId;
|
||||
use domain::testing::{FakePersonQuery, NoopEventPublisher};
|
||||
use std::sync::Arc;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::person::{deps::GetPersonDeps, get};
|
||||
|
||||
#[tokio::test]
|
||||
async fn returns_none_for_unknown_person() {
|
||||
let deps = GetPersonDeps {
|
||||
person_query: Arc::new(FakePersonQuery),
|
||||
event_publisher: NoopEventPublisher::new(),
|
||||
};
|
||||
|
||||
let result = get::execute(&deps, PersonId::from_uuid(Uuid::new_v4()))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert!(result.is_none());
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
use domain::models::PersonId;
|
||||
use domain::testing::{FakePersonQuery, NoopEventPublisher};
|
||||
use std::sync::Arc;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::person::{deps::GetPersonDeps, get_credits};
|
||||
|
||||
#[tokio::test]
|
||||
async fn returns_empty_credits() {
|
||||
let deps = GetPersonDeps {
|
||||
person_query: Arc::new(FakePersonQuery),
|
||||
event_publisher: NoopEventPublisher::new(),
|
||||
};
|
||||
|
||||
let result = get_credits::execute(&deps, PersonId::from_uuid(Uuid::new_v4()))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert!(result.cast.is_empty());
|
||||
assert!(result.crew.is_empty());
|
||||
}
|
||||
Reference in New Issue
Block a user