30 lines
770 B
Rust
30 lines
770 B
Rust
mod test_context;
|
|
mod test_requests;
|
|
pub use test_context::{setup, teardown, DbTestContext};
|
|
pub use test_requests::RequestConfig;
|
|
pub use test_requests::{read_body, test_delete, test_get, test_post, test_put};
|
|
|
|
pub use actix_http::StatusCode;
|
|
|
|
macro_rules! assert_snapshot {
|
|
($x:expr) => {
|
|
insta::with_settings!({snapshot_path => "../../../snapshots"}, {
|
|
insta::assert_snapshot!($x);
|
|
});
|
|
};
|
|
}
|
|
|
|
macro_rules! assert_mail_snapshot {
|
|
($x:expr) => {
|
|
insta::with_settings!({filters => vec![
|
|
(r"[[:alnum:]]{40}", "boundary"),
|
|
("(?m)Date: .*$", "Date: Date")
|
|
]}, {
|
|
insta::assert_snapshot!($x);
|
|
});
|
|
};
|
|
}
|
|
|
|
pub(crate) use assert_mail_snapshot;
|
|
pub(crate) use assert_snapshot;
|