mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-23 16:21:06 +01:00
test: fix tests based on mime-guess inference
relates to https://github.com/abonander/mime_guess/pull/86
This commit is contained in:
parent
0b193c7106
commit
763c58445a
@ -307,11 +307,11 @@ mod tests {
|
|||||||
let resp = file.respond_to(&req);
|
let resp = file.respond_to(&req);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
resp.headers().get(header::CONTENT_TYPE).unwrap(),
|
resp.headers().get(header::CONTENT_TYPE).unwrap(),
|
||||||
"application/javascript; charset=utf-8"
|
"text/javascript",
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
resp.headers().get(header::CONTENT_DISPOSITION).unwrap(),
|
resp.headers().get(header::CONTENT_DISPOSITION).unwrap(),
|
||||||
"inline; filename=\"test.js\""
|
"inline; filename=\"test.js\"",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,12 +351,9 @@ mod tests {
|
|||||||
assert_eq!(resp.headers().get(CONTENT_TYPE).unwrap(), "text/plain");
|
assert_eq!(resp.headers().get(CONTENT_TYPE).unwrap(), "text/plain");
|
||||||
|
|
||||||
let resp = Response::build(StatusCode::OK)
|
let resp = Response::build(StatusCode::OK)
|
||||||
.content_type(mime::APPLICATION_JAVASCRIPT_UTF_8)
|
.content_type(mime::TEXT_JAVASCRIPT)
|
||||||
.body(Bytes::new());
|
.body(Bytes::new());
|
||||||
assert_eq!(
|
assert_eq!(resp.headers().get(CONTENT_TYPE).unwrap(), "text/javascript");
|
||||||
resp.headers().get(CONTENT_TYPE).unwrap(),
|
|
||||||
"application/javascript; charset=utf-8"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
Reference in New Issue
Block a user