diff options
| author | hukl <contact@smyck.org> | 2009-03-29 14:14:56 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-03-29 14:14:56 +0200 |
| commit | c2fa7429dfb10a018731320a49e7ea061feef784 (patch) | |
| tree | ec124ffbacace269e38911f62103d6ecd9406d75 /test/unit/page_test.rb | |
| parent | 14eae971ba9a385442d5950288f2a74511c09baa (diff) | |
a few more assertions
Diffstat (limited to 'test/unit/page_test.rb')
| -rw-r--r-- | test/unit/page_test.rb | 10 |
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 |
| 132 | end | 142 | end |
