Compare commits
3 commits
db7d803f25
...
6e1587a159
Author | SHA1 | Date | |
---|---|---|---|
6e1587a159 | |||
8e1af0410c | |||
1443e6dfce |
2 changed files with 5 additions and 7 deletions
|
@ -2,14 +2,15 @@
|
|||
//!
|
||||
//!
|
||||
|
||||
mod result;
|
||||
mod system;
|
||||
mod result;
|
||||
|
||||
pub use result::{Error, Result};
|
||||
|
||||
pub use system::{MatchOn, Net};
|
||||
use system::{Mocked, Unmocked};
|
||||
|
||||
|
||||
/// Creates a new `Net`.
|
||||
pub const fn new() -> Net<Unmocked> {
|
||||
Net::<Unmocked>::new()
|
||||
|
|
|
@ -43,10 +43,7 @@ async fn test_get_wrong_url() {
|
|||
net.on(request).respond(my_response.into());
|
||||
|
||||
//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
|
||||
assert_eq!(invalid_request.url().to_string(), "https://some.other.url/");
|
||||
|
|
Loading…
Reference in a new issue