Adds a 'Create and continue' button on the spent time form (#9995).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8687 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -119,6 +119,28 @@ class TimelogControllerTest < ActionController::TestCase
|
||||
assert_equal 3, t.user_id
|
||||
end
|
||||
|
||||
def test_create_and_continue
|
||||
@request.session[:user_id] = 2
|
||||
post :create, :project_id => 1,
|
||||
:time_entry => {:activity_id => '11',
|
||||
:issue_id => '',
|
||||
:spent_on => '2008-03-14',
|
||||
:hours => '7.3'},
|
||||
:continue => '1'
|
||||
assert_redirected_to '/projects/ecookbook/time_entries/new'
|
||||
end
|
||||
|
||||
def test_create_and_continue_with_issue_id
|
||||
@request.session[:user_id] = 2
|
||||
post :create, :project_id => 1,
|
||||
:time_entry => {:activity_id => '11',
|
||||
:issue_id => '1',
|
||||
:spent_on => '2008-03-14',
|
||||
:hours => '7.3'},
|
||||
:continue => '1'
|
||||
assert_redirected_to '/projects/ecookbook/issues/1/time_entries/new'
|
||||
end
|
||||
|
||||
def test_create_without_log_time_permission_should_be_denied
|
||||
@request.session[:user_id] = 2
|
||||
Role.find_by_name('Manager').remove_permission! :log_time
|
||||
|
||||
Reference in New Issue
Block a user