mirror of
https://gitlab.com/keys.openpgp.org/hagrid.git
synced 2025-10-05 16:12:44 +02:00
Move case for "GET /about" (privacy_policy_is_visible) of hagrid::web::tests::basics() test to hagrid::routes::about::tests::get_about module.
This commit is contained in:
committed by
Vincent Breitmoser
parent
090a6f222a
commit
20ebdbd0e2
@@ -60,5 +60,26 @@ mod tests {
|
||||
// TODO check translation
|
||||
assert!(response.into_string().unwrap().contains("Hagrid"));
|
||||
}
|
||||
|
||||
#[rstest]
|
||||
#[case::privacy_policy_is_visible(
|
||||
"/about",
|
||||
Status::Ok,
|
||||
ContentType::HTML,
|
||||
"distribution and discovery"
|
||||
)]
|
||||
fn basics(
|
||||
#[from(client)] (_tmpdir, client): (TempDir, Client),
|
||||
#[case] uri: &str,
|
||||
#[case] status: Status,
|
||||
#[case] content_type: ContentType,
|
||||
#[case] page_text: &'static str,
|
||||
) {
|
||||
let response = client.get(uri).dispatch();
|
||||
|
||||
assert_eq!(response.status(), status);
|
||||
assert_eq!(response.content_type(), Some(content_type));
|
||||
assert!(response.into_string().unwrap().contains(page_text));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -969,12 +969,6 @@ pub mod tests {
|
||||
}
|
||||
|
||||
#[rstest]
|
||||
#[case::privacy_policy_is_visible(
|
||||
"/about",
|
||||
Status::Ok,
|
||||
ContentType::HTML,
|
||||
"distribution and discovery"
|
||||
)]
|
||||
#[case::privacy_policy_is_visible(
|
||||
"/about/privacy",
|
||||
Status::Ok,
|
||||
|
Reference in New Issue
Block a user