diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2018-08-07 12:11:39 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2018-08-07 12:11:39 +0200 |
commit | fb3d996d90f9e496654ae4485b9d036dcc7baf8a (patch) | |
tree | 0af403e71890557a134bad875349cffffe9d31c5 /tests | |
parent | 1a7686fa596e9b93239edfac4db07b4b083f18a4 (diff) | |
download | rust-zotapi-fb3d996d90f9e496654ae4485b9d036dcc7baf8a.tar.gz rust-zotapi-fb3d996d90f9e496654ae4485b9d036dcc7baf8a.tar.bz2 rust-zotapi-fb3d996d90f9e496654ae4485b9d036dcc7baf8a.zip |
First iteration of getting channel stream from server.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/zotapi.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/zotapi.rs b/tests/zotapi.rs new file mode 100644 index 0000000..c45673f --- /dev/null +++ b/tests/zotapi.rs @@ -0,0 +1,18 @@ +extern crate zotapi; +extern crate mockito; + +use mockito::mock; + +#[test] +fn get_channel_stream() { + let m = mock("GET", "/api/z/1.0/channel/stream") + .with_status(200) + .with_header("content-type", "application/json") + .with_body("{}") + .create(); + + let z = zotapi::client(format!("http://{}", mockito::SERVER_ADDRESS)); + let data = z.channel_stream(); + m.assert(); + assert_eq!(data, "{}"); +} |