|
|
|
|
@ -93,7 +93,7 @@ async fn delete_source_without_auth_returns_401() {
|
|
|
|
|
// Build a DELETE request without session
|
|
|
|
|
let req = Request::builder()
|
|
|
|
|
.method(Method::DELETE)
|
|
|
|
|
.uri(&format!("/api/v1/sources/{}", fake_id))
|
|
|
|
|
.uri(format!("/api/v1/sources/{}", fake_id))
|
|
|
|
|
.header("X-Requested-With", "XMLHttpRequest")
|
|
|
|
|
.body(Body::empty())
|
|
|
|
|
.unwrap();
|
|
|
|
|
@ -937,7 +937,7 @@ async fn export_csv_with_sources_returns_csv() {
|
|
|
|
|
// Export CSV
|
|
|
|
|
let req = Request::builder()
|
|
|
|
|
.method(Method::GET)
|
|
|
|
|
.uri(&format!("/api/v1/sources/export-csv?theme_id={}", theme_id))
|
|
|
|
|
.uri(format!("/api/v1/sources/export-csv?theme_id={}", theme_id))
|
|
|
|
|
.header(
|
|
|
|
|
"Cookie",
|
|
|
|
|
format!("ai_synth_session={}", session),
|
|
|
|
|
@ -1002,7 +1002,7 @@ async fn export_csv_with_no_sources_returns_header_only() {
|
|
|
|
|
|
|
|
|
|
let req = Request::builder()
|
|
|
|
|
.method(Method::GET)
|
|
|
|
|
.uri(&format!("/api/v1/sources/export-csv?theme_id={}", theme_id))
|
|
|
|
|
.uri(format!("/api/v1/sources/export-csv?theme_id={}", theme_id))
|
|
|
|
|
.header(
|
|
|
|
|
"Cookie",
|
|
|
|
|
format!("ai_synth_session={}", session),
|
|
|
|
|
@ -1065,7 +1065,7 @@ fn build_csv_multipart_request(
|
|
|
|
|
|
|
|
|
|
Request::builder()
|
|
|
|
|
.method(Method::POST)
|
|
|
|
|
.uri(&format!("/api/v1/sources/import-csv?theme_id={}", theme_id))
|
|
|
|
|
.uri(format!("/api/v1/sources/import-csv?theme_id={}", theme_id))
|
|
|
|
|
.header(
|
|
|
|
|
"Content-Type",
|
|
|
|
|
format!("multipart/form-data; boundary={}", boundary),
|
|
|
|
|
@ -1242,7 +1242,7 @@ async fn csv_export_roundtrip() {
|
|
|
|
|
// Export CSV
|
|
|
|
|
let req = Request::builder()
|
|
|
|
|
.method(Method::GET)
|
|
|
|
|
.uri(&format!("/api/v1/sources/export-csv?theme_id={}", theme_id))
|
|
|
|
|
.uri(format!("/api/v1/sources/export-csv?theme_id={}", theme_id))
|
|
|
|
|
.header("Cookie", format!("ai_synth_session={}", session))
|
|
|
|
|
.body(Body::empty())
|
|
|
|
|
.unwrap();
|
|
|
|
|
|