Fix Two bugs from Toby Bartels

1. Ensure that "rollback" respects locked pages.
2. Expire revisions of an edited page. Use a before_save
   hook to deal with the situation where a page's name
   has been changed.
This commit is contained in:
Jacques Distler 2009-08-04 00:02:04 -05:00
parent 0e0f666fb4
commit 329fafafce
4 changed files with 16 additions and 1 deletions

View file

@ -543,6 +543,7 @@ END_THM
Revision.create(:page => @page, :content => 'What a red and lovely morning today',
:author => Author.new('DavidHeinemeierHansson'), :revised_at => Time.now)
@page.reload
assert_equal "<p><span> What a<del class='diffmod'> blue</del><ins class='diffmod'> red" +
"</ins> and lovely morning<ins class='diffins'> today</ins></span></p>", test_renderer(@page.revisions.last).display_diff
end