summaryrefslogtreecommitdiff
path: root/test/unit/page_test.rb
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2010-01-14 22:21:43 +0100
committerhukl <contact@smyck.org>2010-01-14 22:21:43 +0100
commit57d1382013c85a7b11ac8ce5e683f6006b12b328 (patch)
tree19646c4fa5952fa1cf0a2c874952affa346373f1 /test/unit/page_test.rb
parent1b86bf5f2e35d1820bfa32d979bcc2d9ff9a9a8e (diff)
Updated globalize2 to latest version. Modified existing code accoringly
Diffstat (limited to 'test/unit/page_test.rb')
-rw-r--r--test/unit/page_test.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/unit/page_test.rb b/test/unit/page_test.rb
index bb82da0..099b79d 100644
--- a/test/unit/page_test.rb
+++ b/test/unit/page_test.rb
@@ -108,20 +108,20 @@ class PageTest < ActiveSupport::TestCase
108 108
109 assert_not_nil page = Page.create!( :title => "Hallo" ) 109 assert_not_nil page = Page.create!( :title => "Hallo" )
110 page.reload 110 page.reload
111 assert_equal 2, page.globalize_translations.size 111 assert_equal 1, page.translations.size
112 assert_equal [], Page.find_with_outdated_translations 112 assert_equal [], Page.find_with_outdated_translations
113 113
114 I18n.locale = :en 114 I18n.locale = :en
115 page.title = "Hello" 115 page.title = "Hello"
116 page.save 116 page.save
117 117
118 assert_equal 3, page.globalize_translations.size 118 assert_equal 2, page.translations.size
119 assert_equal 0, Page.find_with_outdated_translations.size 119 assert_equal 0, Page.find_with_outdated_translations.size
120 120
121 english = *page.globalize_translations.select {|x| x.locale == :en} 121 english = *page.translations.select {|x| x.locale == :en}
122 PageTranslation.record_timestamps = false 122 Page::Translation.record_timestamps = false
123 english.update_attributes(:updated_at => (Time.now+25.hours)) 123 english.update_attributes(:updated_at => (Time.now+25.hours))
124 PageTranslation.record_timestamps = true 124 Page::Translation.record_timestamps = true
125 assert_equal 1, Page.find_with_outdated_translations.count 125 assert_equal 1, Page.find_with_outdated_translations.count
126 126
127 I18n.locale = :de 127 I18n.locale = :de