Compare commits
3 commits
6e1587a159
...
db7d803f25
Author | SHA1 | Date | |
---|---|---|---|
db7d803f25 | |||
68b930a542 | |||
c81fe6753f |
2 changed files with 7 additions and 5 deletions
|
@ -2,15 +2,14 @@
|
||||||
//!
|
//!
|
||||||
//!
|
//!
|
||||||
|
|
||||||
mod system;
|
|
||||||
mod result;
|
mod result;
|
||||||
|
mod system;
|
||||||
|
|
||||||
pub use result::{Error, Result};
|
pub use result::{Error, Result};
|
||||||
|
|
||||||
pub use system::{MatchOn, Net};
|
pub use system::{MatchOn, Net};
|
||||||
use system::{Mocked, Unmocked};
|
use system::{Mocked, Unmocked};
|
||||||
|
|
||||||
|
|
||||||
/// Creates a new `Net`.
|
/// Creates a new `Net`.
|
||||||
pub const fn new() -> Net<Unmocked> {
|
pub const fn new() -> Net<Unmocked> {
|
||||||
Net::<Unmocked>::new()
|
Net::<Unmocked>::new()
|
||||||
|
|
|
@ -43,7 +43,10 @@ async fn test_get_wrong_url() {
|
||||||
net.on(request).respond(my_response.into());
|
net.on(request).respond(my_response.into());
|
||||||
|
|
||||||
//when
|
//when
|
||||||
let_assert!(Err(Error::UnexpectedMockRequest(invalid_request)) = net.send(client.get("https://some.other.url/")).await);
|
let_assert!(
|
||||||
|
Err(Error::UnexpectedMockRequest(invalid_request)) =
|
||||||
|
net.send(client.get("https://some.other.url/")).await
|
||||||
|
);
|
||||||
|
|
||||||
//then
|
//then
|
||||||
assert_eq!(invalid_request.url().to_string(), "https://some.other.url/");
|
assert_eq!(invalid_request.url().to_string(), "https://some.other.url/");
|
||||||
|
|
Loading…
Reference in a new issue