diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-10-28 14:42:34 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-10-28 14:42:34 +0000 |
commit | 8ed715440eaa48d06b1c21f281c906d2c0765719 (patch) | |
tree | b5d9a7d827644a2077e86c0d73b7e67d411ba367 /test/functional/context_menus_controller_test.rb | |
parent | 723125eedb95a94868618b6b81ecddcfff7aa0fc (diff) | |
download | redmine-8ed715440eaa48d06b1c21f281c906d2c0765719.tar.gz redmine-8ed715440eaa48d06b1c21f281c906d2c0765719.zip |
fix source indent of ContextMenusControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@20221 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/context_menus_controller_test.rb')
-rw-r--r-- | test/functional/context_menus_controller_test.rb | 104 |
1 files changed, 76 insertions, 28 deletions
diff --git a/test/functional/context_menus_controller_test.rb b/test/functional/context_menus_controller_test.rb index 4e844df0e..5309e7ba6 100644 --- a/test/functional/context_menus_controller_test.rb +++ b/test/functional/context_menus_controller_test.rb @@ -38,9 +38,12 @@ class ContextMenusControllerTest < Redmine::ControllerTest def test_context_menu_one_issue @request.session[:user_id] = 2 - get :issues, :params => { + get( + :issues, + :params => { :ids => [1] } + ) assert_response :success assert_select 'a.icon-edit[href=?]', '/issues/1/edit', :text => 'Edit' @@ -61,9 +64,12 @@ class ContextMenusControllerTest < Redmine::ControllerTest def test_context_menu_one_issue_by_anonymous with_settings :default_language => 'en' do - get :issues, :params => { + get( + :issues, + :params => { :ids => [1] } + ) assert_response :success assert_select 'a.icon-del.disabled[href="#"]', :text => 'Delete' @@ -72,9 +78,12 @@ class ContextMenusControllerTest < Redmine::ControllerTest def test_context_menu_multiple_issues_of_same_project @request.session[:user_id] = 2 - get :issues, :params => { + get( + :issues, + :params => { :ids => [1, 2] } + ) assert_response :success ids = [1, 2].map {|i| "ids%5B%5D=#{i}"}.join('&') @@ -90,9 +99,12 @@ class ContextMenusControllerTest < Redmine::ControllerTest def test_context_menu_multiple_issues_of_different_projects @request.session[:user_id] = 2 - get :issues, :params => { + get( + :issues, + :params => { :ids => [1, 2, 6] } + ) assert_response :success ids = [1, 2, 6].map {|i| "ids%5B%5D=#{i}"}.join('&') @@ -109,10 +121,12 @@ class ContextMenusControllerTest < Redmine::ControllerTest field = IssueCustomField.create!(:name => 'List', :field_format => 'list', :possible_values => ['Foo', 'Bar'], :is_for_all => true, :tracker_ids => [1, 2, 3]) @request.session[:user_id] = 2 - get :issues, :params => { + get( + :issues, + :params => { :ids => [1] } - + ) assert_select "li.cf_#{field.id}" do assert_select 'a[href="#"]', :text => 'List' assert_select 'ul' do @@ -127,10 +141,12 @@ class ContextMenusControllerTest < Redmine::ControllerTest field = IssueCustomField.create!(:name => 'List', :is_required => true, :field_format => 'list', :possible_values => ['Foo', 'Bar'], :is_for_all => true, :tracker_ids => [1, 2, 3]) @request.session[:user_id] = 2 - get :issues, :params => { + get( + :issues, + :params => { :ids => [1, 2] } - + ) assert_select "li.cf_#{field.id}" do assert_select 'a[href="#"]', :text => 'List' assert_select 'ul' do @@ -147,10 +163,12 @@ class ContextMenusControllerTest < Redmine::ControllerTest issue.custom_field_values = {field.id => 'Bar'} issue.save! @request.session[:user_id] = 2 - get :issues, :params => { + get( + :issues, + :params => { :ids => [1] } - + ) assert_select "li.cf_#{field.id}" do assert_select 'a[href="#"]', :text => 'List' assert_select 'ul' do @@ -164,10 +182,12 @@ class ContextMenusControllerTest < Redmine::ControllerTest field = IssueCustomField.create!(:name => 'Bool', :field_format => 'bool', :is_for_all => true, :tracker_ids => [1, 2, 3]) @request.session[:user_id] = 2 - get :issues, :params => { + get( + :issues, + :params => { :ids => [1] } - + ) assert_select "li.cf_#{field.id}" do assert_select 'a[href="#"]', :text => 'Bool' assert_select 'ul' do @@ -183,10 +203,12 @@ class ContextMenusControllerTest < Redmine::ControllerTest field = IssueCustomField.create!(:name => 'User', :field_format => 'user', :is_for_all => true, :tracker_ids => [1, 2, 3]) @request.session[:user_id] = 2 - get :issues, :params => { + get( + :issues, + :params => { :ids => [1] } - + ) assert_select "li.cf_#{field.id}" do assert_select 'a[href="#"]', :text => 'User' assert_select 'ul' do @@ -200,10 +222,12 @@ class ContextMenusControllerTest < Redmine::ControllerTest def test_context_menu_should_include_version_custom_fields field = IssueCustomField.create!(:name => 'Version', :field_format => 'version', :is_for_all => true, :tracker_ids => [1, 2, 3]) @request.session[:user_id] = 2 - get :issues, :params => { + get( + :issues, + :params => { :ids => [1] } - + ) assert_select "li.cf_#{field.id}" do assert_select 'a[href="#"]', :text => 'Version' assert_select 'ul' do @@ -228,19 +252,24 @@ class ContextMenusControllerTest < Redmine::ControllerTest issue = Issue.generate!(:project_id => 1, :tracker_id => 1) @request.session[:user_id] = 2 - get :issues, :params => { + get( + :issues, + :params => { :ids => [issue.id] } - + ) assert_select "li.cf_#{enabled_cf.id}" assert_select "li.cf_#{disabled_cf.id}", 0 end def test_context_menu_by_assignable_user_should_include_assigned_to_me_link @request.session[:user_id] = 2 - get :issues, :params => { + get( + :issues, + :params => { :ids => [1] } + ) assert_response :success assert_select 'a[href=?]', '/issues/bulk_update?ids%5B%5D=1&issue%5Bassigned_to_id%5D=2', :text => / me / @@ -250,18 +279,24 @@ class ContextMenusControllerTest < Redmine::ControllerTest @request.session[:user_id] = 2 version = Version.create!(:name => 'Shared', :sharing => 'system', :project_id => 1) - get :issues, :params => { + get( + :issues, + :params => { :ids => [1, 4] } + ) assert_response :success assert_select 'a', :text => 'eCookbook - Shared' end def test_context_menu_with_issue_that_is_not_visible_should_fail - get :issues, :params => { + get( + :issues, + :params => { :ids => [1, 4] # issue 4 is not visible } + ) assert_response 302 end @@ -272,9 +307,12 @@ class ContextMenusControllerTest < Redmine::ControllerTest def test_time_entries_context_menu @request.session[:user_id] = 2 - get :time_entries, :params => { + get( + :time_entries, + :params => { :ids => [1, 2] } + ) assert_response :success assert_select 'a:not(.disabled)', :text => 'Edit' @@ -282,9 +320,12 @@ class ContextMenusControllerTest < Redmine::ControllerTest def test_context_menu_for_one_time_entry @request.session[:user_id] = 2 - get :time_entries, :params => { + get( + :time_entries, + :params => { :ids => [1] } + ) assert_response :success assert_select 'a:not(.disabled)', :text => 'Edit' @@ -294,9 +335,12 @@ class ContextMenusControllerTest < Redmine::ControllerTest field = TimeEntryCustomField.generate!(:name => "Field", :field_format => "list", :possible_values => ["foo", "bar"]) @request.session[:user_id] = 2 - get :time_entries, :params => { + get( + :time_entries, + :params => { :ids => [1, 2] } + ) assert_response :success assert_select "li.cf_#{field.id}" do @@ -315,10 +359,12 @@ class ContextMenusControllerTest < Redmine::ControllerTest Role.find_by_name('Manager').remove_permission! :edit_time_entries Role.find_by_name('Manager').add_permission! :edit_own_time_entries ids = (0..1).map {TimeEntry.generate!(:user => User.find(2)).id} - - get :time_entries, :params => { + get( + :time_entries, + :params => { :ids => ids } + ) assert_response :success assert_select 'a:not(.disabled)', :text => 'Edit' @@ -327,10 +373,12 @@ class ContextMenusControllerTest < Redmine::ControllerTest def test_time_entries_context_menu_without_edit_permission @request.session[:user_id] = 2 Role.find_by_name('Manager').remove_permission! :edit_time_entries - - get :time_entries, :params => { + get( + :time_entries, + :params => { :ids => [1, 2] } + ) assert_response :success assert_select 'a.disabled', :text => 'Edit' |