Tests use the README's example drive id instead of a real drive's (#5)
CI / checks (push) Successful in 38s
CI / checks (push) Successful in 38s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit was merged in pull request #5.
This commit is contained in:
+9
-9
@@ -70,26 +70,26 @@ mod tests {
|
||||
#[tokio::test]
|
||||
async fn the_mcp_panel_url_is_used_as_given() {
|
||||
assert_eq!(
|
||||
endpoint("https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8"),
|
||||
Ok("https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8".to_owned())
|
||||
endpoint("https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456"),
|
||||
Ok("https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456".to_owned())
|
||||
);
|
||||
assert_eq!(
|
||||
endpoint(" https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8/ \n"),
|
||||
Ok("https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8".to_owned())
|
||||
endpoint(" https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456/ \n"),
|
||||
Ok("https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456".to_owned())
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn a_drive_page_address_finds_the_same_endpoint() {
|
||||
for page in [
|
||||
"https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8",
|
||||
"https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8?path=notes",
|
||||
"https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8/notes/today.md",
|
||||
"https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8/manage#members",
|
||||
"https://aindrive.ainetwork.ai/d/AbCdEf123456",
|
||||
"https://aindrive.ainetwork.ai/d/AbCdEf123456?path=notes",
|
||||
"https://aindrive.ainetwork.ai/d/AbCdEf123456/notes/today.md",
|
||||
"https://aindrive.ainetwork.ai/d/AbCdEf123456/manage#members",
|
||||
] {
|
||||
assert_eq!(
|
||||
endpoint(page),
|
||||
Ok("https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8".to_owned()),
|
||||
Ok("https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456".to_owned()),
|
||||
"{page}"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user