Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Remove willow.radicle.garden from httpd-api router unit tests
Sebastian Martinez committed 2 years ago
commit 3b16632e3dd577e517095e304ed4d0b132cd79a5
parent 06cc991fd260a016f0563ddb423fca7dab911f4d
1 file changed +8 -8
modified tests/unit/router.test.ts
@@ -8,7 +8,7 @@ window.origin = "http://localhost:3000";
describe("route invariant when parsed", () => {
  const origin = "http://localhost:3000";
  const node = {
-
    hostname: "willow.radicle.garden",
+
    hostname: "example.node.tld",
    port: 8000,
    scheme: "http",
  };
@@ -247,11 +247,11 @@ describe("pathToRoute", () => {
  });

  test("nodes", () => {
-
    expectPathToRoute("/nodes/willow.radicle.garden", {
+
    expectPathToRoute("/nodes/example.node.tld", {
      resource: "nodes",
      params: {
        baseUrl: {
-
          hostname: "willow.radicle.garden",
+
          hostname: "example.node.tld",
          scheme: "http",
          port: defaultHttpdPort,
        },
@@ -262,11 +262,11 @@ describe("pathToRoute", () => {

  test("project with trailing slash", () => {
    expectPathToRoute(
-
      "/nodes/willow.radicle.garden/rad:zKtT7DmF9H34KkvcKj9PHW19WzjT/",
+
      "/nodes/example.node.tld/rad:zKtT7DmF9H34KkvcKj9PHW19WzjT/",
      {
        resource: "project.source",
        node: {
-
          hostname: "willow.radicle.garden",
+
          hostname: "example.node.tld",
          scheme: "http",
          port: defaultHttpdPort,
        },
@@ -278,11 +278,11 @@ describe("pathToRoute", () => {

  test("project without trailing slash", () => {
    expectPathToRoute(
-
      "/nodes/willow.radicle.garden/rad:zKtT7DmF9H34KkvcKj9PHW19WzjT",
+
      "/nodes/example.node.tld/rad:zKtT7DmF9H34KkvcKj9PHW19WzjT",
      {
        resource: "project.source",
        node: {
-
          hostname: "willow.radicle.garden",
+
          hostname: "example.node.tld",
          scheme: "http",
          port: defaultHttpdPort,
        },
@@ -294,7 +294,7 @@ describe("pathToRoute", () => {

  test("non-existent project route", () => {
    expectPathToRoute(
-
      "/nodes/willow.radicle.garden/rad:zKtT7DmF9H34KkvcKj9PHW19WzjT/nope",
+
      "/nodes/example.node.tld/rad:zKtT7DmF9H34KkvcKj9PHW19WzjT/nope",
      null,
    );
  });