From 707d6d3d543d9e51a7b03a52f5193681b366d062 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 9 Nov 2024 13:33:08 +0100 Subject: [PATCH] `nodeinfo`: Add two basic (failing) tests --- acrate-nodeinfo/tests/discover_test.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 acrate-nodeinfo/tests/discover_test.rs diff --git a/acrate-nodeinfo/tests/discover_test.rs b/acrate-nodeinfo/tests/discover_test.rs new file mode 100644 index 0000000..716e014 --- /dev/null +++ b/acrate-nodeinfo/tests/discover_test.rs @@ -0,0 +1,26 @@ +#![allow(non_snake_case)] + +use acrate_nodeinfo::*; + + +#[tokio::test] +async fn discover_hostmeta__junimo_party() { + let client = reqwest::Client::new(); + let base: reqwest::Url = "https://junimo.party".parse() + .expect("a valid URL"); + + HostMetaDocument::discover_hostmeta(&client, base) + .await + .expect("host-meta discovery to succeed"); +} + +#[tokio::test] +async fn discover_nodeinfo__junimo_party() { + let client = reqwest::Client::new(); + let base: reqwest::Url = "https://junimo.party".parse() + .expect("a valid URL"); + + HostMetaDocument::discover_nodeinfo(&client, base) + .await + .expect("nodeinfo discovery to succeed"); +}