aboutsummaryrefslogtreecommitdiffstats
path: root/tests/zotapi.rs
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2020-02-13 12:54:12 +0100
committerHarald Eilertsen <haraldei@anduin.net>2020-02-13 12:54:12 +0100
commit732d289605b72260711357b73ba5fa88921d77fd (patch)
tree4f013cd5ea6a9e10b017c467fbe2732be6774deb /tests/zotapi.rs
parent1ba083af3576d20b5c1fc1c6ebacefd91ceb6636 (diff)
downloadrust-zotapi-732d289605b72260711357b73ba5fa88921d77fd.tar.gz
rust-zotapi-732d289605b72260711357b73ba5fa88921d77fd.tar.bz2
rust-zotapi-732d289605b72260711357b73ba5fa88921d77fd.zip
Add fetching ABConfig for only a given contact.
Diffstat (limited to 'tests/zotapi.rs')
-rw-r--r--tests/zotapi.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/zotapi.rs b/tests/zotapi.rs
index 70a9564..9dbf5cf 100644
--- a/tests/zotapi.rs
+++ b/tests/zotapi.rs
@@ -275,6 +275,18 @@ fn fetch_abconfig() {
}
#[test]
+fn fetch_abconfig_for_specific_contact() {
+ let m = mock_with_authorization("GET", "/api/z/1.0/abconfig")
+ .match_query(Matcher::UrlEncoded("abook_id".into(), 42.to_string()))
+ .with_status(200)
+ .with_body("[]")
+ .create();
+
+ zotapi::abconfig::with_abook_id(42).fetch(&client()).unwrap();
+ m.assert();
+}
+
+#[test]
fn fetch_privacy_groups() {
let m = default_mock("GET", "/api/z/1.0/group");
let _res = zotapi::group().fetch(&client()).unwrap();