mirror of
https://gitlab.com/keys.openpgp.org/hagrid.git
synced 2025-10-06 00:23:08 +02:00
Add docs for tests modules: common, common::assert, common::test.
This is to better explain their purpose.
This commit is contained in:
committed by
Vincent Breitmoser
parent
3bb755d8d9
commit
62a6248b29
@@ -75,6 +75,9 @@ pub mod tests {
|
|||||||
use rstest::rstest;
|
use rstest::rstest;
|
||||||
use tempfile::TempDir;
|
use tempfile::TempDir;
|
||||||
|
|
||||||
|
/// Contains reusable code which can be shared across different tests, like response assertions,
|
||||||
|
/// fixtures to set up the test environment and particular test implementations
|
||||||
|
/// which can be seeded with different values, but the implementation scheme remains the same.
|
||||||
pub mod common {
|
pub mod common {
|
||||||
use crate::app::configure_rocket;
|
use crate::app::configure_rocket;
|
||||||
use ::rocket::http::ContentType;
|
use ::rocket::http::ContentType;
|
||||||
@@ -256,6 +259,7 @@ pub mod tests {
|
|||||||
"token-pseudo-random"
|
"token-pseudo-random"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Contains reusable assertion helpers.
|
||||||
pub mod assert {
|
pub mod assert {
|
||||||
use ::rocket::http::{ContentType, Status};
|
use ::rocket::http::{ContentType, Status};
|
||||||
use ::rocket::local::blocking::LocalResponse;
|
use ::rocket::local::blocking::LocalResponse;
|
||||||
@@ -312,6 +316,7 @@ pub mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Contains reusable test implementations.
|
||||||
pub mod test {
|
pub mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
use ::rocket::http::{ContentType, Status};
|
use ::rocket::http::{ContentType, Status};
|
||||||
|
Reference in New Issue
Block a user