mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 19:05:51 +01:00
Fixed: log time form not displayed on issue edit with :log_time permission only (#9405).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7924 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1195,6 +1195,22 @@ class IssuesControllerTest < ActionController::TestCase
|
||||
:parent => {:tag => 'select', :attributes => {:id => 'issue_priority_id'} }
|
||||
end
|
||||
|
||||
def test_get_edit_should_display_the_time_entry_form_with_log_time_permission
|
||||
@request.session[:user_id] = 2
|
||||
Role.find_by_name('Manager').update_attribute :permissions, [:view_issues, :edit_issues, :log_time]
|
||||
|
||||
get :edit, :id => 1
|
||||
assert_tag 'input', :attributes => {:name => 'time_entry[hours]'}
|
||||
end
|
||||
|
||||
def test_get_edit_should_not_display_the_time_entry_form_without_log_time_permission
|
||||
@request.session[:user_id] = 2
|
||||
Role.find_by_name('Manager').remove_permission! :log_time
|
||||
|
||||
get :edit, :id => 1
|
||||
assert_no_tag 'input', :attributes => {:name => 'time_entry[hours]'}
|
||||
end
|
||||
|
||||
def test_get_edit_with_params
|
||||
@request.session[:user_id] = 2
|
||||
get :edit, :id => 1, :issue => { :status_id => 5, :priority_id => 7 },
|
||||
|
||||
Reference in New Issue
Block a user