-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v1.6.33 - THIS_MONTH date literal bugfix (#617)
* Updates prettier dependencies * Tentatively fixes MONTH-based literals for non-US based locales. Needs a bit of cleanup, but will do the trick for now * Housekeeping on cached RollupRelationshipFieldFinder.Traversal while investigating #616
- Loading branch information
1 parent
30bbc45
commit 3df910c
Showing
11 changed files
with
26,840 additions
and
8,811 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,18 @@ private class RollupDateLiteralTests { | |
) | ||
); | ||
insert cpcs; | ||
|
||
insert new User( | ||
LastName = 'Australia User', | ||
Username = '' + System.now().getTime() + '@RollupDateLiteralTests.org', | ||
Email = '[email protected]', | ||
EmailEncodingKey = 'ISO-8859-1', | ||
Alias = 'aususer', | ||
TimeZoneSidKey = 'Australia/Sydney', | ||
LocaleSidKey = 'en_US', | ||
LanguageLocaleKey = 'en_US', | ||
ProfileId = UserInfo.getProfileId() | ||
); | ||
} | ||
|
||
@IsTest | ||
|
@@ -175,7 +187,7 @@ private class RollupDateLiteralTests { | |
System.assertEquals( | ||
true, | ||
literal.matches(possibleDate, equality), | ||
'Literal defined as ' + literal + ' should have matched ' + possibleDate + ' for ' + equality + '\n' | ||
'Literal defined as ' + literal + ' should have matched ' + possibleDate + ' for ' + equality + ' for timezone ' + UserInfo.getTimeZone() + '\n' | ||
); | ||
} | ||
|
||
|
@@ -217,6 +229,11 @@ private class RollupDateLiteralTests { | |
@IsTest | ||
static void shouldWorkForThisMonth() { | ||
runTestForLiteral('THIS_MONTH'); | ||
// TODO extend this more generally throughout this test class | ||
User australiaUser = [SELECT Id FROM User WHERE LastName = 'Australia User']; | ||
System.runAs(australiaUser) { | ||
runTestForLiteral('THIS_MONTH'); | ||
} | ||
} | ||
|
||
@IsTest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.