Skip to content

Commit 5467dc6

Browse files
committed
extra case sensitivity tests
1 parent 96eff4c commit 5467dc6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

spec/search/search.spec.js

+12
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,15 @@ describe("Search", () => {
113113
let searchResults = searchService.findNotesWithQuery('#capital=Vienna', searchContext);
114114
expect(searchResults.length).toEqual(1);
115115
expect(findNoteByTitle(searchResults, "Austria")).toBeTruthy();
116+
117+
// case sensitivity:
118+
searchResults = searchService.findNotesWithQuery('#CAPITAL=VIENNA', searchContext);
119+
expect(searchResults.length).toEqual(1);
120+
expect(findNoteByTitle(searchResults, "Austria")).toBeTruthy();
121+
122+
searchResults = searchService.findNotesWithQuery('#caPItal=vienNa', searchContext);
123+
expect(searchResults.length).toEqual(1);
124+
expect(findNoteByTitle(searchResults, "Austria")).toBeTruthy();
116125
});
117126

118127
it("label comparison with full syntax", () => {
@@ -473,13 +482,16 @@ describe("Search", () => {
473482
}
474483

475484
test("type", "text", 7);
485+
test("TYPE", "TEXT", 7);
476486
test("type", "code", 0);
477487

478488
test("mime", "text/html", 6);
479489
test("mime", "application/json", 0);
480490

481491
test("isProtected", "false", 7);
492+
test("isProtected", "FALSE", 7);
482493
test("isProtected", "true", 0);
494+
test("isProtected", "TRUE", 0);
483495

484496
test("dateCreated", "'2020-05-14 12:11:42.001+0200'", 1);
485497
test("dateCreated", "wrong", 0);

0 commit comments

Comments
 (0)