Skip to content

Commit e88fc2c

Browse files
committed
fix rust caip-122 test
1 parent 185ff4e commit e88fc2c

File tree

1 file changed

+7
-2
lines changed
  • backend/lib/src/api/handlers

1 file changed

+7
-2
lines changed

backend/lib/src/api/handlers/auth.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,14 +659,19 @@ mod tests {
659659
let app = mock_app().await;
660660
let server = TestServer::new(app).unwrap();
661661

662+
// Use a URI that will fail parsing even after prepending https://
662663
let message_request = NonceRequest {
663664
address: MOCK_ADDRESS,
664665
chain_id: 1,
665-
uri: "not-a-valid-uri".to_string(),
666+
uri: "https://exa mple.com".to_string(),
666667
};
667668

668669
let response = server.post("/auth/message").json(&message_request).await;
669-
assert_eq!(response.status_code(), StatusCode::BAD_REQUEST);
670+
let status = response.status_code();
671+
let body = response.text();
672+
println!("Response status: {:?}", status);
673+
println!("Response body: {}", body);
674+
assert_eq!(status, StatusCode::BAD_REQUEST);
670675
}
671676

672677
#[tokio::test]

0 commit comments

Comments
 (0)