mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 12:07:19 +00:00
Fix timezone related sameday filter test failure
In certain timezones, 201304151312 UTC is not actually the same day as 201304152219 any 201304151756. This was causing the test for the 'sameday' filter operator to fail. (I'm in GMT+10). This is a quick-fix. I've just adjusted the timestamps to be close together so they will be same day no matter what timezone you're in.
This commit is contained in:
parent
6780a16ce9
commit
8487221654
@ -29,13 +29,13 @@ describe("Filter tests", function() {
|
||||
text: "The quick brown fox in $:/TiddlerTwo",
|
||||
tags: ["one"],
|
||||
modifier: "JoeBloggs",
|
||||
modified: "201304152219"});
|
||||
modified: "201304152222"});
|
||||
wiki.addTiddler({
|
||||
title: "$:/TiddlerTwo",
|
||||
text: "The rain in Spain\nfalls mainly on the plain and [[a fourth tiddler]]",
|
||||
tags: ["two"],
|
||||
modifier: "JohnDoe",
|
||||
modified: "201304151756"});
|
||||
modified: "201304152211"});
|
||||
wiki.addTiddler({
|
||||
title: "Tiddler Three",
|
||||
text: "The speed of sound in light\n\nThere is no TiddlerZero but TiddlerSix",
|
||||
@ -206,7 +206,7 @@ describe("Filter tests", function() {
|
||||
});
|
||||
|
||||
it("should handle the sameday operator", function() {
|
||||
expect(wiki.filterTiddlers("[sameday[201304151312]sort[title]]").join(",")).toBe("$:/TiddlerTwo,TiddlerOne");
|
||||
expect(wiki.filterTiddlers("[sameday[201304152200]sort[title]]").join(",")).toBe("$:/TiddlerTwo,TiddlerOne");
|
||||
});
|
||||
|
||||
describe("testing the is operator",function() {
|
||||
|
Loading…
Reference in New Issue
Block a user