From da113570daf4b2d17cd828e3b512774485870ff0 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 26 Nov 2018 23:43:56 -0800 Subject: implement hide flag --- rust/tests/test_api_server_http.rs | 16 +++++++++++++--- rust/tests/test_old_python_tests.rs | 4 ++-- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'rust/tests') diff --git a/rust/tests/test_api_server_http.rs b/rust/tests/test_api_server_http.rs index c179637c..614e6b65 100644 --- a/rust/tests/test_api_server_http.rs +++ b/rust/tests/test_api_server_http.rs @@ -81,7 +81,7 @@ fn test_entity_gets() { // expand keyword check_http_response( request::get( - "http://localhost:9411/v0/release/aaaaaaaaaaaaarceaaaaaaaaai?expand=all", + "http://localhost:9411/v0/release/aaaaaaaaaaaaarceaaaaaaaaai?expand=container", headers.clone(), &router, ), @@ -89,6 +89,17 @@ fn test_entity_gets() { Some("MySpace Blog"), ); + // hide keyword + check_http_response( + request::get( + "http://localhost:9411/v0/release/aaaaaaaaaaaaarceaaaaaaaaai?hide=refs,container", + headers.clone(), + &router, + ), + status::Ok, + Some("bigger example"), + ); + check_http_response( request::get( "http://localhost:9411/v0/work/aaaaaaaaaaaaavkvaaaaaaaaai", @@ -463,8 +474,7 @@ fn test_post_release() { status::BadRequest, None, ); - */ -} + */} #[test] fn test_post_work() { diff --git a/rust/tests/test_old_python_tests.rs b/rust/tests/test_old_python_tests.rs index 1b496328..5e33a7f6 100644 --- a/rust/tests/test_old_python_tests.rs +++ b/rust/tests/test_old_python_tests.rs @@ -148,7 +148,7 @@ fn test_api_rich_create() { }; // test that foreign key relations worked - let re = match client.get_release(release_id.clone(), None).wait().unwrap() { + let re = match client.get_release(release_id.clone(), None, None).wait().unwrap() { GetReleaseResponse::FoundEntity(e) => e, _ => unreachable!(), }; @@ -166,7 +166,7 @@ fn test_api_rich_create() { stub_release_id ); - let fe = match client.get_file(file_id, None).wait().unwrap() { + let fe = match client.get_file(file_id, None, None).wait().unwrap() { GetFileResponse::FoundEntity(e) => e, _ => unreachable!(), }; -- cgit v1.2.3