Skip to content

Commit

Permalink
add xml comment back && add test
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Feb 29, 2024
1 parent b7e7684 commit 2b17906
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
4 changes: 2 additions & 2 deletions starsky/starsky/Controllers/TrashController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ public async Task<IActionResult> TrashMoveAsync(string f, bool collections = fal

return Json(fileIndexResultsList);
}

/// <summary>

/// <summary>
/// Is the system trash supported
/// Used in End2End tests to enable or disable the trash
/// </summary>
/// <returns>bool with json (IActionResult Result)</returns>
/// <response code="200">the item including the updated content</response>
/// <response code="401">User unauthorized</response>
/// </summary>
[ProducesResponseType(typeof(bool), 200)]
[HttpGet("/api/trash/detect-to-use-system-trash")]
[Produces("application/json")]
Expand Down
18 changes: 18 additions & 0 deletions starsky/starsky/clientapp/src/shared/url/url-path.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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("");
Expand Down
5 changes: 5 additions & 0 deletions starsky/starsky/clientapp/src/shared/url/url-query.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 2b17906

Please sign in to comment.