Skip to content

Commit

Permalink
test(core): remove types dir
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon committed Sep 25, 2023
1 parent 653c533 commit ada16be
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 136 deletions.
7 changes: 7 additions & 0 deletions viz-core/tests/type_json.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use std::{net::IpAddr, str};
use viz_core::{types::Json, Request, RequestExt, Result};

#[test]
fn json() -> Result<()> {
Ok(())
}
File renamed without changes.
11 changes: 8 additions & 3 deletions viz-core/tests/realip.rs → viz-core/tests/type_realip.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
use http::HeaderValue;
use viz_core::{header::FORWARDED, types::RealIp, Request, RequestExt};
use viz_core::{
header::{HeaderValue, FORWARDED},
types::RealIp,
Request, RequestExt, Result,
};

#[test]
fn realip() {
fn realip() -> Result<()> {
let mut req = Request::default();
req.headers_mut()
.insert(RealIp::X_REAL_IP, HeaderValue::from_static("10.10.10.10"));
Expand All @@ -27,4 +30,6 @@ fn realip() {
req.extensions_mut()
.insert("1.1.1.1:80".parse::<std::net::SocketAddr>().unwrap());
assert_eq!(req.realip(), Some(RealIp("1.1.1.1".parse().unwrap())));

Ok(())
}
113 changes: 0 additions & 113 deletions viz-core/tests/types/payload.rs

This file was deleted.

20 changes: 0 additions & 20 deletions viz-core/tests/types/realip.rs

This file was deleted.

0 comments on commit ada16be

Please sign in to comment.