Skip to content
Snippets Groups Projects
Commit 4195a053 authored by Guillaume Delhumeau's avatar Guillaume Delhumeau
Browse files

[Misc] Fix failing test that was dependent of the current time zone.

parent d8afa7a5
No related branches found
No related tags found
No related merge requests found
......@@ -200,12 +200,12 @@ public void complexCase1() throws Exception
ExpressionNode result = mocker.getComponentUnderTest().filterExpression(user, filterPreferences, preference);
assertNotNull(result);
assertEquals("(((NOT (WIKI = \"wikiA\") OR ((WIKI = \"wikiA\" AND SPACE STARTS WITH \"wikiA:SpaceB\")" +
" AND DATE >= \"Thu Jan 01 01:00:00 CET 1970\")) "+
" AND DATE >= \""+ new Date(0).toString() + "\")) "+
"OR ((WIKI = \"wikiA\" AND SPACE STARTS WITH \"wikiA:SpaceB.SpaceC.SpaceD\") " +
"AND DATE >= \"Thu Jan 01 01:00:00 CET 1970\")) "+
"AND DATE >= \""+ new Date(0).toString() + "\")) "+
"AND (NOT ((WIKI = \"wikiA\" " +
"AND SPACE STARTS WITH \"wikiA:SpaceB.SpaceC\")) OR ((WIKI = \"wikiA\" " +
"AND SPACE STARTS WITH \"wikiA:SpaceB.SpaceC.SpaceD\") AND DATE >= \"Thu Jan 01 01:00:00 CET 1970\")))",
"AND SPACE STARTS WITH \"wikiA:SpaceB.SpaceC.SpaceD\") AND DATE >= \""+ new Date(0).toString() + "\")))",
result.toString());
// Test with wikiA:SpaceE (filtered by β)
......@@ -280,7 +280,7 @@ public void testWithTopLevelInclusiveFilters() throws Exception
// Test 1
String result = mocker.getComponentUnderTest().filterExpression(user, filterPreferences, preference).toString();
assertEquals("((WIKI = \"wikiA\" AND SPACE STARTS WITH \"wikiA:SpaceB\") "
+ "AND DATE >= \"Thu Jan 01 01:00:00 CET 1970\")", result);
+ "AND DATE >= \""+ new Date(0).toString() + "\")", result);
// Test with wikiA:SpaceE (filtered by γ & ζ)
Event event1 = mock(Event.class);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment