Skip to content

Commit

Permalink
chore(frontend/utils): add tests for parse-filename with umlaut
Browse files Browse the repository at this point in the history
  • Loading branch information
c0rydoras committed Sep 4, 2024
1 parent d15d0d7 commit f5c3642
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions frontend/tests/unit/utils/parse-filename-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ module("Unit | Helper | parse filename", function () {
assert.strictEqual(result, "1805-20240710-Customer-Sample_Project.ods");
});

test("works with umlauts", function (assert) {
const result = parseFileName(
"attachment; filename*=utf-8''1805-20240710-C%C3%BCstomer-Sample_Project.ods"
);

assert.strictEqual(result, "1805-20240710-Cüstomer-Sample_Project.ods");
});

test("falls back to 'Unknown file'", function (assert) {
const result = parseFileName("attachment;");

Expand Down

0 comments on commit f5c3642

Please sign in to comment.