This commit is contained in:
retoor 2025-11-09 00:04:53 +01:00
parent 6248a2086c
commit 8d740be5fb

View File

@ -30,7 +30,6 @@ async def test_dashboard_get_authorized(client):
resp = await client.get("/dashboard") resp = await client.get("/dashboard")
assert resp.status == 200 assert resp.status == 200
text = await resp.text() text = await resp.text()
assert "Welcome back, Test User!" in text
assert "My Files" in text assert "My Files" in text
@ -57,12 +56,10 @@ async def test_security_get(client):
assert "Your Data, Our Priority" in text assert "Your Data, Our Priority" in text
async def test_support_get(client): async def test_support_get_unauthorized(client):
resp = await client.get("/support") resp = await client.get("/support", allow_redirects=False)
assert resp.status == 200 assert resp.status == 302
text = await resp.text() assert resp.headers["Location"] == "/login"
assert "Support" in text
assert "We're Here to Help You Succeed" in text
async def test_use_cases_get(client): async def test_use_cases_get(client):
@ -136,36 +133,28 @@ async def test_privacy_get(client):
assert "This Privacy Policy describes how Retoor's Cloud Solutions collects, uses, and discloses your information" in text assert "This Privacy Policy describes how Retoor's Cloud Solutions collects, uses, and discloses your information" in text
async def test_shared_get(client): async def test_shared_get_unauthorized(client):
resp = await client.get("/shared") resp = await client.get("/shared", allow_redirects=False)
assert resp.status == 200 assert resp.status == 302
text = await resp.text() assert resp.headers["Location"] == "/login"
assert "Shared with me" in text
assert "Files and folders that have been shared with you will appear here." in text
async def test_recent_get(client): async def test_recent_get_unauthorized(client):
resp = await client.get("/recent") resp = await client.get("/recent", allow_redirects=False)
assert resp.status == 200 assert resp.status == 302
text = await resp.text() assert resp.headers["Location"] == "/login"
assert "Recent Files" in text
assert "Your recently accessed files will appear here." in text
async def test_favorites_get(client): async def test_favorites_get_unauthorized(client):
resp = await client.get("/favorites") resp = await client.get("/favorites", allow_redirects=False)
assert resp.status == 200 assert resp.status == 302
text = await resp.text() assert resp.headers["Location"] == "/login"
assert "Favorites" in text
assert "Your favorite files and folders will appear here." in text
async def test_trash_get(client): async def test_trash_get_unauthorized(client):
resp = await client.get("/trash") resp = await client.get("/trash", allow_redirects=False)
assert resp.status == 200 assert resp.status == 302
text = await resp.text() assert resp.headers["Location"] == "/login"
assert "Trash" in text
assert "Files and folders you have deleted will appear here." in text
async def test_file_browser_get_unauthorized(client): async def test_file_browser_get_unauthorized(client):