diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2020-01-03 23:42:37 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2020-01-03 23:42:37 +0100 |
commit | 970df3ea4169eb2fe935a0f50012503079b8636d (patch) | |
tree | 4b339e01e957ecf63e7a0d9a67ceabc77496e3d3 /tests | |
parent | 0c76f0c9727a512475e29b5d099b5b7188f72052 (diff) | |
download | rust-zotapi-970df3ea4169eb2fe935a0f50012503079b8636d.tar.gz rust-zotapi-970df3ea4169eb2fe935a0f50012503079b8636d.tar.bz2 rust-zotapi-970df3ea4169eb2fe935a0f50012503079b8636d.zip |
Make channel and network stream behave like the rest.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/zotapi.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/zotapi.rs b/tests/zotapi.rs index 4c0a207..e22ba30 100644 --- a/tests/zotapi.rs +++ b/tests/zotapi.rs @@ -38,7 +38,7 @@ fn client() -> zotapi::Client { #[test] fn get_channel_stream() { let m = default_mock("GET", "/api/z/1.0/channel/stream"); - let data = client().channel_stream(); + let data = zotapi::channel_stream().fetch(&client()); m.assert(); assert_eq!(data.unwrap(), "{}"); } @@ -46,7 +46,7 @@ fn get_channel_stream() { #[test] fn get_network_stream() { let m = default_mock("GET", "/api/z/1.0/network/stream"); - let data = client().network_stream(); + let data = zotapi::network_stream().fetch(&client()); m.assert(); assert_eq!(data.unwrap(), "{}"); } @@ -59,7 +59,7 @@ fn return_error_if_invalid_auth_provided() { .with_body("This api requires login") .create(); - let data = client().channel_stream(); + let data = zotapi::channel_stream().fetch(&client()); m.assert(); assert!(data.is_err()); assert_eq!(format!("{:?}", data), "Err(Unauthorized)"); |