| Hi all, just noticed an ordering problem in the site drop unit test on trunk.
<["<Article:1>", "<Article:6>", "<Article:7>", "<Article:2>", "<Article:15>", "<Article:16>", "<Article:17>", "<Article:14>", "<Article:13>", "<Article:12>"]> expected but was <["<Article:1>", "<Article:6>", "<Article:7>", "<Article:2>", "<Article:17>", "<Article:16>", "<Article:15>", "<Article:14>", "<Article:13>", "<Article:12>"]>.
This test uses the latest_articles method in the site drop, which in turn does a find_by_date, which in turn looks at the published article date. The only problem is that articles 15, 16, and 17 in the fixtures all use the same date, namely Time.now.utc.beginning_of_month.advance(:months => -1). By my reckoning it's implementation dependent as to which order the articles are returned in.
The following patch adjusts the dates for these fixtures by a few seconds to ensure the order specified in the unit test:
Result is a clean run of the unit tests on my system. (Now for the functionals...)
|