summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-03-29 14:14:56 +0200
committerhukl <contact@smyck.org>2009-03-29 14:14:56 +0200
commitc2fa7429dfb10a018731320a49e7ea061feef784 (patch)
treeec124ffbacace269e38911f62103d6ecd9406d75 /test
parent14eae971ba9a385442d5950288f2a74511c09baa (diff)
a few more assertions
Diffstat (limited to 'test')
-rw-r--r--test/unit/page_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/page_test.rb b/test/unit/page_test.rb
index 04a7ba5..2ada6de 100644
--- a/test/unit/page_test.rb
+++ b/test/unit/page_test.rb
@@ -128,5 +128,15 @@ class PageTest < ActiveSupport::TestCase
128 english.update_attributes(:updated_at => (Time.now+25.hours)) 128 english.update_attributes(:updated_at => (Time.now+25.hours))
129 PageTranslation.record_timestamps = true 129 PageTranslation.record_timestamps = true
130 assert_equal 1, Page.find_with_outdated_translations.count 130 assert_equal 1, Page.find_with_outdated_translations.count
131
132 I18n.locale = :de
133 page2 = Page.create!( :title => "Hallo2" )
134 I18n.locale = :en
135 page2.title = "Hello2"
136 page2.save!
137
138 assert_equal 0, Page.find_with_outdated_translations(:delta_time => 23.days).count
139 assert_equal 1, Page.find_with_outdated_translations(:delta_time => 23.minutes).count
140 assert_equal 2, Page.count
131 end 141 end
132end 142end