docs: update for new crate layout
This commit is contained in:
@@ -1,15 +1,7 @@
|
||||
use super::*;
|
||||
use crate::test_support::local_actor;
|
||||
use domain::value_objects::{InstanceIdentity, SocialActor, SocialIdentity, UserId};
|
||||
|
||||
fn local_actor(uid: &UserId) -> SocialActor {
|
||||
SocialActor {
|
||||
identity: SocialIdentity::Local(uid.clone()),
|
||||
handle: "@gabriel@md.example".into(),
|
||||
display_name: None,
|
||||
avatar_url: None,
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn local_actor_dto_url_round_trips_back_to_the_same_identity() {
|
||||
let instance = InstanceIdentity::new("https://md.example");
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
use super::*;
|
||||
use domain::value_objects::{InstanceIdentity, SocialActor, SocialIdentity, UserId};
|
||||
|
||||
fn local_actor(uid: &UserId) -> SocialActor {
|
||||
SocialActor {
|
||||
identity: SocialIdentity::Local(uid.clone()),
|
||||
handle: "@gabriel@md.example".into(),
|
||||
display_name: None,
|
||||
avatar_url: None,
|
||||
}
|
||||
}
|
||||
use crate::test_support::local_actor;
|
||||
use domain::value_objects::{InstanceIdentity, SocialIdentity, UserId};
|
||||
|
||||
#[test]
|
||||
fn local_blocked_dto_url_round_trips_back_to_the_same_identity() {
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
use super::*;
|
||||
use domain::value_objects::{InstanceIdentity, SocialActor, SocialIdentity, UserId};
|
||||
|
||||
fn local_actor(uid: &UserId) -> SocialActor {
|
||||
SocialActor {
|
||||
identity: SocialIdentity::Local(uid.clone()),
|
||||
handle: "@gabriel@md.example".into(),
|
||||
display_name: None,
|
||||
avatar_url: None,
|
||||
}
|
||||
}
|
||||
use crate::test_support::local_actor;
|
||||
use domain::value_objects::{InstanceIdentity, SocialIdentity, UserId};
|
||||
|
||||
#[test]
|
||||
fn local_template_url_round_trips_back_to_the_same_identity() {
|
||||
|
||||
@@ -8,3 +8,5 @@ pub mod openapi;
|
||||
pub mod router;
|
||||
pub mod state;
|
||||
mod support;
|
||||
#[cfg(test)]
|
||||
mod test_support;
|
||||
|
||||
12
crates/adapters/http-axum/src/test_support.rs
Normal file
12
crates/adapters/http-axum/src/test_support.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
//! Fixtures shared by the in-crate mapper tests.
|
||||
|
||||
use domain::value_objects::{SocialActor, SocialIdentity, UserId};
|
||||
|
||||
pub(crate) fn local_actor(uid: &UserId) -> SocialActor {
|
||||
SocialActor {
|
||||
identity: SocialIdentity::Local(uid.clone()),
|
||||
handle: "@gabriel@md.example".into(),
|
||||
display_name: None,
|
||||
avatar_url: None,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user