diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2008-08-20 05:09:13 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2008-08-20 05:09:13 +0000 |
commit | af6b01f55d96ccf9560251707a2136050b0a6648 (patch) | |
tree | 3f22f6860f7e764d27a85ca7653aa2655cc5bba9 /test/functional/wiki_controller_test.rb | |
parent | a899904f6340c337b0e3ac6309731b8bcf95fd56 (diff) | |
download | redmine-af6b01f55d96ccf9560251707a2136050b0a6648.tar.gz redmine-af6b01f55d96ccf9560251707a2136050b0a6648.zip |
Hiding the View Differences button when a wiki page's history only has one version.
Patch contributed by Chaoqun Zou (#1743)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1749 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/wiki_controller_test.rb')
-rw-r--r-- | test/functional/wiki_controller_test.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index bbfdc8e7f..b5325357c 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -109,8 +109,18 @@ class WikiControllerTest < Test::Unit::TestCase assert_template 'history' assert_not_nil assigns(:versions) assert_equal 3, assigns(:versions).size + assert_select "input[type=submit][name=commit]" end - + + def test_history_with_one_version + get :history, :id => 1, :page => 'Another_page' + assert_response :success + assert_template 'history' + assert_not_nil assigns(:versions) + assert_equal 1, assigns(:versions).size + assert_select "input[type=submit][name=commit]", false + end + def test_diff get :diff, :id => 1, :page => 'CookBook_documentation', :version => 2, :version_from => 1 assert_response :success |