diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-10-11 15:31:42 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-10-11 15:31:42 +0000 |
commit | 435c90eb478e705dff9ea239fd280a958a4287e3 (patch) | |
tree | 531e116594529af7016f7360d78ae67e7e9cdacd /test | |
parent | 700c302fca1ef401eff2744ffc5d955406136b17 (diff) | |
download | redmine-435c90eb478e705dff9ea239fd280a958a4287e3.tar.gz redmine-435c90eb478e705dff9ea239fd280a958a4287e3.zip |
Refactor: extract TimelogController#edit to #update
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4248 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/timelog_controller_test.rb | 4 | ||||
-rw-r--r-- | test/integration/routing_test.rb | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb index 91b8ca47c..28ca93531 100644 --- a/test/functional/timelog_controller_test.rb +++ b/test/functional/timelog_controller_test.rb @@ -56,7 +56,7 @@ class TimelogControllerTest < ActionController::TestCase assert_response :success assert_template 'edit' # Default activity selected - assert_tag :tag => 'form', :attributes => { :action => '/projects/ecookbook/timelog/edit/2' } + assert_tag :tag => 'form', :attributes => { :action => '/projects/ecookbook/timelog/update/2' } end def test_get_edit_with_an_existing_time_entry_with_inactive_activity @@ -101,7 +101,7 @@ class TimelogControllerTest < ActionController::TestCase assert_equal 2, entry.user_id @request.session[:user_id] = 1 - post :edit, :id => 1, + put :update, :id => 1, :time_entry => {:issue_id => '2', :hours => '8'} assert_redirected_to :action => 'index', :project_id => 'ecookbook' diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb index 8f96745bb..401ce960f 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -239,8 +239,9 @@ class RoutingTest < ActionController::IntegrationTest should_route :get, "/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22' should_route :post, "/projects/ecookbook/timelog/edit", :controller => 'timelog', :action => 'create', :project_id => 'ecookbook' - should_route :post, "/time_entries/22/edit", :controller => 'timelog', :action => 'edit', :id => '22' should_route :post, "/time_entries/55/destroy", :controller => 'timelog', :action => 'destroy', :id => '55' + + should_route :put, "/time_entries/22", :controller => 'timelog', :action => 'update', :id => '22' end context "time_entry_reports" do |