mirror of
https://github.com/thegeneralist01/archivr
synced 2026-07-22 03:05:32 +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();
|
.unwrap();
|
||||||
assert_eq!(assign_resp.status(), StatusCode::CREATED, "assign tag should return 201");
|
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())
|
let response = app(registry.clone(), auth_path.clone())
|
||||||
.oneshot(
|
.oneshot(
|
||||||
Request::builder()
|
Request::builder()
|
||||||
.uri("/api/archives/test/entries/search?tag=%2Fscience")
|
.uri("/api/archives/test/entries/search?tag=%2Fscience")
|
||||||
|
.header("cookie", &session_cookie)
|
||||||
.body(Body::empty())
|
.body(Body::empty())
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
)
|
)
|
||||||
|
|
@ -1555,6 +1556,7 @@ mod tests {
|
||||||
.oneshot(
|
.oneshot(
|
||||||
Request::builder()
|
Request::builder()
|
||||||
.uri("/api/archives/test/entries/search?tag=%2Fart")
|
.uri("/api/archives/test/entries/search?tag=%2Fart")
|
||||||
|
.header("cookie", &session_cookie)
|
||||||
.body(Body::empty())
|
.body(Body::empty())
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue