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:
parent
24c5321f6e
commit
dd56fc8c70
1 changed files with 3 additions and 1 deletions
|
|
@ -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(),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue