aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2019-06-09 22:51:27 +0200
committerHarald Eilertsen <haraldei@anduin.net>2019-06-09 22:51:27 +0200
commitc9ac54435649973c1aa0543434cc344e66cf33f8 (patch)
tree6209b40117a60896c0d018b09a68d3e3a3690c46 /tests
parent051e884f55162498bae05e796b431e9122313c11 (diff)
downloadrust-zotapi-c9ac54435649973c1aa0543434cc344e66cf33f8.tar.gz
rust-zotapi-c9ac54435649973c1aa0543434cc344e66cf33f8.tar.bz2
rust-zotapi-c9ac54435649973c1aa0543434cc344e66cf33f8.zip
Fetch privacy groups.
Diffstat (limited to 'tests')
-rw-r--r--tests/zotapi.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/zotapi.rs b/tests/zotapi.rs
index 93c9795..7d10c6b 100644
--- a/tests/zotapi.rs
+++ b/tests/zotapi.rs
@@ -239,3 +239,17 @@ fn fetch_abconfig() {
let _res = z.abconfig().fetch().unwrap();
m.assert();
}
+
+#[test]
+fn fetch_privacy_groups() {
+ let m = mock("GET", "/api/z/1.0/group")
+ .match_header("Authorization", Matcher::Regex(r"Basic \w+".into()))
+ .with_status(200)
+ .with_header("content-type", "application/json")
+ .with_body("{}")
+ .create();
+
+ let z = zotapi::client(&format!("http://{}", mockito::SERVER_ADDRESS), "testuser", "test1234");
+ let _res = z.group().fetch().unwrap();
+ m.assert();
+}