diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-17 15:55:08 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-17 15:55:08 +0000 |
commit | bd193a026df09ba231b241c24b43762810af7871 (patch) | |
tree | 9adc2db6ad84e9a4c6efefe0814ddf6edf0c54f7 /test/functional/versions_controller_test.rb | |
parent | eb1f58f9624a22d4b5a22f1510c858fa6d5cf7cb (diff) | |
download | redmine-bd193a026df09ba231b241c24b43762810af7871.tar.gz redmine-bd193a026df09ba231b241c24b43762810af7871.zip |
Refactor: convert VersionsController to a REST resource.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4097 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/versions_controller_test.rb')
-rw-r--r-- | test/functional/versions_controller_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb index 1b33ba816..e4ac5c068 100644 --- a/test/functional/versions_controller_test.rb +++ b/test/functional/versions_controller_test.rb @@ -108,14 +108,14 @@ class VersionsControllerTest < ActionController::TestCase def test_close_completed Version.update_all("status = 'open'") @request.session[:user_id] = 2 - post :close_completed, :project_id => 'ecookbook' + put :close_completed, :project_id => 'ecookbook' assert_redirected_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => 'ecookbook' assert_not_nil Version.find_by_status('closed') end def test_post_update @request.session[:user_id] = 2 - post :update, :id => 2, + put :update, :id => 2, :version => { :name => 'New version name', :effective_date => Date.today.strftime("%Y-%m-%d")} assert_redirected_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => 'ecookbook' @@ -126,7 +126,7 @@ class VersionsControllerTest < ActionController::TestCase def test_destroy @request.session[:user_id] = 2 - post :destroy, :id => 3 + delete :destroy, :id => 3 assert_redirected_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => 'ecookbook' assert_nil Version.find_by_id(3) end |