diff --git a/test/functional/notes_controller_test.rb b/test/functional/notes_controller_test.rb index 2a8a3f791..f5be8d2af 100644 --- a/test/functional/notes_controller_test.rb +++ b/test/functional/notes_controller_test.rb @@ -64,8 +64,12 @@ class NotesControllerTest < ActionController::TestCase context "revert action" do setup do @note = FactoryGirl.create(:note, :body => "000") - @note.update_attributes(:body => "111") - @note.update_attributes(:body => "222") + Timecop.travel(1.day.from_now) do + @note.update_attributes(:body => "111") + end + Timecop.travel(2.days.from_now) do + @note.update_attributes(:body => "222") + end end should "revert to a previous version" do diff --git a/test/functional/wiki_pages_controller_test.rb b/test/functional/wiki_pages_controller_test.rb index adc87a07f..b0701d141 100644 --- a/test/functional/wiki_pages_controller_test.rb +++ b/test/functional/wiki_pages_controller_test.rb @@ -82,8 +82,12 @@ class WikiPagesControllerTest < ActionController::TestCase context "revert action" do setup do @wiki_page = FactoryGirl.create(:wiki_page, :body => "1") - @wiki_page.update_attributes(:body => "1 2") - @wiki_page.update_attributes(:body => "1 2 3") + Timecop.travel(1.day.from_now) do + @wiki_page.update_attributes(:body => "1 2") + end + Timecop.travel(2.days.from_now) do + @wiki_page.update_attributes(:body => "1 2 3") + end end should "revert to a previous version" do