diff --git a/starsky/starsky/Controllers/TrashController.cs b/starsky/starsky/Controllers/TrashController.cs index 79670a6b85..7755794288 100644 --- a/starsky/starsky/Controllers/TrashController.cs +++ b/starsky/starsky/Controllers/TrashController.cs @@ -47,8 +47,7 @@ public async Task TrashMoveAsync(string f, bool collections = fal return Json(fileIndexResultsList); } - - /// + /// /// Is the system trash supported /// Used in End2End tests to enable or disable the trash @@ -56,6 +55,7 @@ public async Task TrashMoveAsync(string f, bool collections = fal /// bool with json (IActionResult Result) /// the item including the updated content /// User unauthorized + /// [ProducesResponseType(typeof(bool), 200)] [HttpGet("/api/trash/detect-to-use-system-trash")] [Produces("application/json")] diff --git a/starsky/starsky/clientapp/src/shared/url/url-path.spec.ts b/starsky/starsky/clientapp/src/shared/url/url-path.spec.ts index 15f1803b3c..3533ad0d5d 100644 --- a/starsky/starsky/clientapp/src/shared/url/url-path.spec.ts +++ b/starsky/starsky/clientapp/src/shared/url/url-path.spec.ts @@ -3,6 +3,24 @@ import { URLPath } from "./url-path"; describe("url-path", () => { const urlPath = new URLPath(); + + describe("StringToIUrl", () => { + it("FileNameBreadcrumb", () => { + const result = urlPath.FileNameBreadcrumb(""); + expect(result).toBe("/"); + }); + + it("FileNameBreadcrumb file.jpg", () => { + const result = urlPath.FileNameBreadcrumb("/file.jpg"); + expect(result).toBe("file.jpg"); + }); + + it("FileNameBreadcrumb /test/file.jpg", () => { + const result = urlPath.FileNameBreadcrumb("/test/file.jpg"); + expect(result).toBe("file.jpg"); + }); + }); + describe("StringToIUrl", () => { it("default no content", () => { const test = urlPath.StringToIUrl(""); diff --git a/starsky/starsky/clientapp/src/shared/url/url-query.spec.ts b/starsky/starsky/clientapp/src/shared/url/url-query.spec.ts index fff71d9b78..73c71b3e10 100644 --- a/starsky/starsky/clientapp/src/shared/url/url-query.spec.ts +++ b/starsky/starsky/clientapp/src/shared/url/url-query.spec.ts @@ -99,6 +99,11 @@ describe("url-query", () => { expect(result).toContain("itemName=name"); }); + it("UrlHomePage", () => { + const result = new UrlQuery().UrlHomePage(); + expect(result).toBe("/"); + }); + it("UrlHomeIndexPage", () => { const result = urlQuery.UrlHomeIndexPage("name"); expect(result).toBe("/name");