summaryrefslogtreecommitdiffstats
path: root/rust/tests/test_api_server_http.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/tests/test_api_server_http.rs')
-rw-r--r--rust/tests/test_api_server_http.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/rust/tests/test_api_server_http.rs b/rust/tests/test_api_server_http.rs
index 2160a0a0..5405c9cb 100644
--- a/rust/tests/test_api_server_http.rs
+++ b/rust/tests/test_api_server_http.rs
@@ -1545,3 +1545,32 @@ fn test_release_types() {
Some("release_type"),
);
}
+
+#[test]
+fn test_create_editgroup() {
+ let (headers, router, _conn) = setup_http();
+
+ // We're authenticated, so don't need to supply editor_id
+ check_http_response(
+ request::post(
+ &format!("http://localhost:9411/v0/editgroup",),
+ headers.clone(),
+ "{}",
+ &router,
+ ),
+ status::Created,
+ None,
+ );
+
+ // But can if we want to
+ check_http_response(
+ request::post(
+ &format!("http://localhost:9411/v0/editgroup",),
+ headers.clone(),
+ r#"{"editor_id": "aaaaaaaaaaaabkvkaaaaaaaaae"}"#,
+ &router,
+ ),
+ status::Created,
+ None,
+ );
+}