1
0
Fork 0
ruma/crates/ruma-client-api/tests/it/headers.rs
Kévin Commaille 85fdc8d7d9 client-api: Fix integration tests file hierarchy
Use the same file hierarchy as other crates, because separate files in
tests are compiled as different executables. We prefer to compile a
single executable named `it` and put the tests in modules under it.
2025-11-11 13:48:15 +01:00

14 lines
449 B
Rust

#![cfg(feature = "client")]
use http::HeaderMap;
use ruma_client_api::discovery::discover_homeserver;
use ruma_common::api::{OutgoingRequest as _, auth_scheme::SendAccessToken};
#[test]
fn get_request_headers() {
let req: http::Request<Vec<u8>> = discover_homeserver::Request::new()
.try_into_http_request("https://homeserver.tld", SendAccessToken::None, ())
.unwrap();
assert_eq!(*req.headers(), HeaderMap::default());
}