1
Fork 0
mirror of https://github.com/thegeneralist01/archivr synced 2026-07-21 18:55:36 +02:00

test(collections): update tag-search test to send auth (private entries require auth)

This commit is contained in:
TheGeneralist 2026-06-26 17:01:43 +02:00
parent 24c5321f6e
commit dd56fc8c70
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4

View file

@ -1531,11 +1531,12 @@ mod tests {
.unwrap();
assert_eq!(assign_resp.status(), StatusCode::CREATED, "assign tag should return 201");
// Search with ?tag=/science — entry should appear
// Search with ?tag=/science — entry should appear (requires auth since entry is private)
let response = app(registry.clone(), auth_path.clone())
.oneshot(
Request::builder()
.uri("/api/archives/test/entries/search?tag=%2Fscience")
.header("cookie", &session_cookie)
.body(Body::empty())
.unwrap(),
)
@ -1555,6 +1556,7 @@ mod tests {
.oneshot(
Request::builder()
.uri("/api/archives/test/entries/search?tag=%2Fart")
.header("cookie", &session_cookie)
.body(Body::empty())
.unwrap(),
)