From c9ac54435649973c1aa0543434cc344e66cf33f8 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 9 Jun 2019 22:51:27 +0200 Subject: Fetch privacy groups. --- tests/zotapi.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') 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(); +} -- cgit v1.2.3