Unwrap text
Report abuse
=== test/unit/section_drop_test.rb
==================================================================
--- test/unit/section_drop_test.rb (revision 2624)
+++ test/unit/section_drop_test.rb (local)
@@ -36,7 +36,7 @@
end
def test_should_get_month_array
- months = sections(:home).articles.collect { |a| a.published? ? a.published_at.beginning_of_month.to_date.to_s(:db) : nil }.compact.uniq.sort.reverse
+ months = sections(:home).articles.collect { |a| (a.published? && !a.pending?) ? a.published_at.beginning_of_month.to_date.to_s(:db) : nil }.compact.uniq.sort.reverse
assert_equal months, sections(:home).to_liquid['months'].collect { |d| d.to_s(:db) }
end
end