aboutsummaryrefslogtreecommitdiffstats
path: root/rust/tests
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-06-30 18:40:27 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-06-30 18:40:27 -0700
commitc88af3a8a92329a598287b5dd3457030e3b4529f (patch)
tree12db7b14015ec028f02c1c329612552db7f8b74f /rust/tests
parent08f7f1642eb8380c5b00f6a54e4b29e55713effd (diff)
downloadfatcat-c88af3a8a92329a598287b5dd3457030e3b4529f.tar.gz
fatcat-c88af3a8a92329a598287b5dd3457030e3b4529f.zip
generic changelog endpoints
Diffstat (limited to 'rust/tests')
-rw-r--r--rust/tests/test_api_server.rs21
1 files changed, 19 insertions, 2 deletions
diff --git a/rust/tests/test_api_server.rs b/rust/tests/test_api_server.rs
index b46367e0..b00d22eb 100644
--- a/rust/tests/test_api_server.rs
+++ b/rust/tests/test_api_server.rs
@@ -501,16 +501,33 @@ fn test_accept_editgroup() {
}
#[test]
+fn test_changelog() {
+ let (headers, router, _conn) = setup();
+
+ check_response(
+ request::get("http://localhost:9411/v0/changelog", headers.clone(), &router),
+ status::Ok,
+ Some("editgroup_id"),
+ );
+
+ check_response(
+ request::get("http://localhost:9411/v0/changelog/1", headers.clone(), &router),
+ status::Ok,
+ Some("files"),
+ );
+}
+
+#[test]
fn test_stats() {
let (headers, router, _conn) = setup();
check_response(
- request::get("http://localhost:9411/v0/stats", headers, &router),
+ request::get("http://localhost:9411/v0/stats", headers.clone(), &router),
status::Ok,
Some("merged_editgroups"),
);
check_response(
- request::get("http://localhost:9411/v0/stats?more=yes", headers, &router),
+ request::get("http://localhost:9411/v0/stats?more=yes", headers.clone(), &router),
status::Ok,
Some("merged_editgroups"),
);