Unit Test for New Dictionary Words Insight is Broken
sarcas opened this issue · comments
Reproduce
Check out a copy of master
.
Run the test suite for NewDictionaryWords
:
php ./webapp/plugins/insightsgenerator/tests/TestOfNewDictionaryWordsInsight.php
Expected Result
All tests should pass
Actual Result
The testTwoMatches
test fails.
It turns out the failure is because of the three Matches
tests in the test class, testTwoMatches
is using a hard coded date August 2013
, and the test is set up to use dates relative to the date the test is run.
The other two tests get around this by using a relative date in the comparison string.
Fixed in 1a3d9d6