From d99083c47ddd31288ed1b688002388f6e68c5e04 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Thu, 13 Feb 2020 14:45:41 +0100 Subject: Refactor how ABConfigs are fetched. Introduce a `z()` menber function that creates the request object that we use for further configuring the requset. This eliminates the need to two fetch functions, and is meant to provide a consistent way of doing these requests. --- tests/zotapi.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/zotapi.rs b/tests/zotapi.rs index 9dbf5cf..b5c1652 100644 --- a/tests/zotapi.rs +++ b/tests/zotapi.rs @@ -266,7 +266,7 @@ fn fetch_abconfig() { .with_body(&data) .create(); - let res = zotapi::abconfig::fetch(&client()).unwrap(); + let res = zotapi::ABConfig::z().fetch(&client()).unwrap(); m.assert(); assert_eq!(res.len(), 2); @@ -282,7 +282,7 @@ fn fetch_abconfig_for_specific_contact() { .with_body("[]") .create(); - zotapi::abconfig::with_abook_id(42).fetch(&client()).unwrap(); + zotapi::ABConfig::z().with_abook_id(42).fetch(&client()).unwrap(); m.assert(); } -- cgit v1.2.3