Improve test.

This commit is contained in:
Justus Winter 2019-03-12 15:47:16 +01:00
parent 7e16849521
commit 44120cdb6c
No known key found for this signature in database
GPG Key ID: 686F55B4AB2B3386
1 changed files with 12 additions and 0 deletions

View File

@ -586,6 +586,18 @@ pub mod tests {
assert_eq!(response.content_type(), Some(ContentType::HTML));
assert!(response.body_string().unwrap().contains("/vks/v1/by-keyid"));
// Check that we see the upload form.
let mut response = client.get("/publish").dispatch();
assert_eq!(response.status(), Status::Ok);
assert_eq!(response.content_type(), Some(ContentType::HTML));
assert!(response.body_string().unwrap().contains("upload"));
// Check that we see the deletion form.
let mut response = client.get("/delete").dispatch();
assert_eq!(response.status(), Status::Ok);
assert_eq!(response.content_type(), Some(ContentType::HTML));
assert!(response.body_string().unwrap().contains("email"));
assert_consistency(client.rocket());
}