diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-10-08 15:39:39 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-10-08 15:39:39 +0000 |
commit | 4acd990ee2950a575a35b32bdfd8a75f04e958b0 (patch) | |
tree | 2bf8be13397290bfae82a5e3ea7b8126b5615875 /test | |
parent | 84ebd786d6eb20693f8ba93a04be93e279be0289 (diff) | |
download | redmine-4acd990ee2950a575a35b32bdfd8a75f04e958b0.tar.gz redmine-4acd990ee2950a575a35b32bdfd8a75f04e958b0.zip |
Refactor: extract TimelogController#create from TimelogController#edit
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4244 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 | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb index 823650257..91b8ca47c 100644 --- a/test/functional/timelog_controller_test.rb +++ b/test/functional/timelog_controller_test.rb @@ -72,11 +72,11 @@ class TimelogControllerTest < ActionController::TestCase assert_tag :tag => 'option', :content => '--- Please select ---' end - def test_post_edit + def test_post_create # TODO: should POST to issues’ time log instead of project. change form # and routing @request.session[:user_id] = 3 - post :edit, :project_id => 1, + post :create, :project_id => 1, :time_entry => {:comments => 'Some work on TimelogControllerTest', # Not the default activity :activity_id => '11', diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb index 3ba01cdc1..8f96745bb 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -238,6 +238,7 @@ class RoutingTest < ActionController::IntegrationTest should_route :get, "/projects/ecookbook/issues/567/time_entries/new", :controller => 'timelog', :action => 'new', :project_id => 'ecookbook', :issue_id => '567' 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' end |