aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2018-09-23 20:20:34 +0200
committerHarald Eilertsen <haraldei@anduin.net>2018-09-23 20:20:34 +0200
commitce5a59c81ba15b6222fb675a4fb9fc2799e91608 (patch)
tree345d20d78ef14f9b9d447a904f9d2d451eb36cdb /tests
parentd0c085b9f3c1634c3fd330eee3c6993a5c3ec39c (diff)
downloadrust-zotapi-ce5a59c81ba15b6222fb675a4fb9fc2799e91608.tar.gz
rust-zotapi-ce5a59c81ba15b6222fb675a4fb9fc2799e91608.tar.bz2
rust-zotapi-ce5a59c81ba15b6222fb675a4fb9fc2799e91608.zip
Begin implement undocumented abconfig API.
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 269e8d7..3f889c5 100644
--- a/tests/zotapi.rs
+++ b/tests/zotapi.rs
@@ -156,3 +156,17 @@ fn fetch_connections() {
let _res = z.abook().fetch().unwrap();
m.assert();
}
+
+#[test]
+fn fetch_abconfig() {
+ let m = mock("GET", "/api/z/1.0/abconfig")
+ .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.abconfig().fetch().unwrap();
+ m.assert();
+}