Skip to content

Commit 2db6fbc

Browse files
committed
Test: a signed-out /api/ui/me asks for JSON, as the React app does (a page request goes to /login since #57)
1 parent 2061521 commit 2db6fbc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎app/tests/me.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ async fn me_shows_their_organizations_and_email_choices(app: Application) -> lar
4242
.assert_json_path("notifications.low_credits", true)
4343
.assert_json_path("heard_about_options.1.key", "ai_assistant")
4444
.assert_json_path("forges", json!([]));
45-
app.get("/api/ui/me").await.assert_status(401);
45+
// Signed out, the React app (asking for JSON) gets a 401; a page would go to /login
46+
app.get("/api/ui/me").header("accept", "application/json").await.assert_status(401);
4647

4748
app.patch("/api/ui/me/notifications")
4849
.acting_as(&ada)

0 commit comments

Comments
 (0)