Unsuccessful save unlocks the page; some tweaks and debug-level logging in in return_to_last_remembered

This commit is contained in:
Alexey Verkhovsky 2005-01-18 00:36:43 +00:00
parent 94292199b2
commit 7c02805102
3 changed files with 15 additions and 8 deletions

View file

@ -542,6 +542,7 @@ class WikiControllerTest < Test::Unit::TestCase
def test_save_new_revision_identical_to_last
revisions_before = @home.revisions.size
@home.lock(Time.now, 'AnAuthor')
r = process 'save', {'web' => 'wiki1', 'id' => 'HomePage',
'content' => @home.revisions.last.content.dup,
@ -553,7 +554,7 @@ class WikiControllerTest < Test::Unit::TestCase
revisions_after = @home.revisions.size
assert_equal revisions_before, revisions_after
assert !@home.locked?(Time.now), 'HomePage should be unlocked if an edit was unsuccessful'
end