mirror of https://github.com/rwf2/Rocket.git
Remove double semicolons; silence test warnings.
This commit is contained in:
parent
b7e688cefa
commit
22da02fa64
|
@ -70,6 +70,7 @@ fn post2(
|
||||||
format!("({}) ({})", string, uri.to_string())
|
format!("({}) ({})", string, uri.to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
#[post("/<_unused_param>?<_unused_query>", data="<_unused_data>")]
|
#[post("/<_unused_param>?<_unused_query>", data="<_unused_data>")]
|
||||||
fn test_unused_params(_unused_param: String, _unused_query: String, _unused_data: Data) {
|
fn test_unused_params(_unused_param: String, _unused_query: String, _unused_data: Data) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ use rocket::local::Client;
|
||||||
use rocket::http::{ContentType, Status};
|
use rocket::http::{ContentType, Status};
|
||||||
|
|
||||||
fn test(uri: &str, content_type: ContentType, status: Status, body: String) {
|
fn test(uri: &str, content_type: ContentType, status: Status, body: String) {
|
||||||
let client = Client::new(rocket()).unwrap();;
|
let client = Client::new(rocket()).unwrap();
|
||||||
let mut response = client.get(uri).header(content_type).dispatch();
|
let mut response = client.get(uri).header(content_type).dispatch();
|
||||||
assert_eq!(response.status(), status);
|
assert_eq!(response.status(), status);
|
||||||
assert_eq!(response.body_string(), Some(body));
|
assert_eq!(response.body_string(), Some(body));
|
||||||
|
@ -30,7 +30,7 @@ fn test_echo() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_upload() {
|
fn test_upload() {
|
||||||
let client = Client::new(rocket()).unwrap();;
|
let client = Client::new(rocket()).unwrap();
|
||||||
let expected_body = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, \
|
let expected_body = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, \
|
||||||
sed do eiusmod tempor incididunt ut labore et dolore \
|
sed do eiusmod tempor incididunt ut labore et dolore \
|
||||||
magna aliqua".to_string();
|
magna aliqua".to_string();
|
||||||
|
|
|
@ -2,7 +2,7 @@ use rocket::local::Client;
|
||||||
use rocket::http::Status;
|
use rocket::http::Status;
|
||||||
|
|
||||||
fn register_hit(client: &Client) {
|
fn register_hit(client: &Client) {
|
||||||
let response = client.get("/").dispatch();;
|
let response = client.get("/").dispatch();
|
||||||
assert_eq!(response.status(), Status::Ok);
|
assert_eq!(response.status(), Status::Ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue