From cb1d8ed54f162b4bc4fc75c7911fc92c296ab2b8 Mon Sep 17 00:00:00 2001 From: Alexey Verkhovsky Date: Mon, 17 Jan 2005 21:31:26 +0000 Subject: [PATCH] Controller-level test for the last revision (submit of an identical revision) --- test/functional/wiki_controller_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index ceb37783..11267754 100755 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -540,6 +540,18 @@ class WikiControllerTest < Test::Unit::TestCase assert !home_page.locked?(Time.now) end + def test_save_new_revision_identical_to_last + revisions_before = @home.revisions.size + + assert_raise(Instiki::ValidationError) { + process 'save', 'web' => 'wiki1', 'id' => 'HomePage', + 'content' => @home.revisions.last.content.dup, + 'author' => 'SomeOtherAuthor' + } + revisions_after = @home.revisions.size + assert_equal revisions_before, revisions_after + end + def test_search setup_wiki_with_three_pages