From 7a24a790df6edc3cb44cb2e12ea057bac1617a99 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 24 Nov 2019 05:27:29 +0000 Subject: [PATCH] cleanup: rubocop: fix Layout/IndentFirstHashElement in test/functional/activities_controller_test.rb git-svn-id: http://svn.redmine.org/redmine/trunk@19234 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/activities_controller_test.rb | 61 +++++++++++++------ 1 file changed, 42 insertions(+), 19 deletions(-) diff --git a/test/functional/activities_controller_test.rb b/test/functional/activities_controller_test.rb index 8d6cc3aca..07dad2091 100644 --- a/test/functional/activities_controller_test.rb +++ b/test/functional/activities_controller_test.rb @@ -31,10 +31,13 @@ class ActivitiesControllerTest < Redmine::ControllerTest :journals, :journal_details def test_project_index - get :index, :params => { + get( + :index, + :params => { :id => 1, :with_subprojects => 0 } + ) assert_response :success assert_select 'h3', :text => /#{2.days.ago.to_date.day}/ @@ -42,18 +45,19 @@ class ActivitiesControllerTest < Redmine::ControllerTest end def test_project_index_with_invalid_project_id_should_respond_404 - get :index, :params => { - :id => 299 - } + get(:index, :params => {:id => 299}) assert_response 404 end def test_previous_project_index @request.session[:user_id] = 1 - get :index, :params => { + get( + :index, + :params => { :id => 1, :from => 2.days.ago.to_date } + ) assert_response :success assert_select 'h3', :text => /#{User.current.time_to_date(3.days.ago).day}/ @@ -74,9 +78,12 @@ class ActivitiesControllerTest < Redmine::ControllerTest def test_user_index @request.session[:user_id] = 1 - get :index, :params => { + get( + :index, + :params => { :user_id => 2 } + ) assert_response :success assert_select 'h2 a[href="/users/2"]', :text => 'John Smith' @@ -89,17 +96,23 @@ class ActivitiesControllerTest < Redmine::ControllerTest end def test_user_index_with_invalid_user_id_should_respond_404 - get :index, :params => { + get( + :index, + :params => { :user_id => 299 } + ) assert_response 404 end def test_index_atom_feed - get :index, :params => { + get( + :index, + :params => { :format => 'atom', :with_subprojects => 0 } + ) assert_response :success assert_select 'feed' do @@ -112,7 +125,9 @@ class ActivitiesControllerTest < Redmine::ControllerTest end def test_index_atom_feed_with_explicit_selection - get :index, :params => { + get( + :index, + :params => { :format => 'atom', :with_subprojects => 0, :show_changesets => 1, @@ -124,7 +139,7 @@ class ActivitiesControllerTest < Redmine::ControllerTest :show_time_entries => 1, :show_wiki_edits => 1 } - + ) assert_response :success assert_select 'feed' do @@ -138,22 +153,26 @@ class ActivitiesControllerTest < Redmine::ControllerTest def test_index_atom_feed_with_one_item_type with_settings :default_language => 'en' do - get :index, :params => { + get( + :index, + :params => { :format => 'atom', :show_issues => '1' } + ) assert_response :success - assert_select 'title', :text => /Issues/ end end def test_index_atom_feed_with_user - get :index, :params => { + get( + :index, + :params => { :user_id => 2, :format => 'atom' } - + ) assert_response :success assert_select 'title', :text => "Redmine: #{User.find(2).name}" end @@ -174,12 +193,14 @@ class ActivitiesControllerTest < Redmine::ControllerTest def test_index_with_submitted_scope_should_save_as_preference @request.session[:user_id] = 2 - - get :index, :params => { + get( + :index, + :params => { :show_issues => '1', :show_messages => '1', :submit => 'Apply' } + ) assert_response :success assert_equal %w(issues messages), User.find(2).pref.activity_scope.sort end @@ -211,10 +232,12 @@ class ActivitiesControllerTest < Redmine::ControllerTest def test_index_up_to_yesterday_should_show_next_page_link @request.session[:user_id] = 2 - - get :index, :params => { - :from => (User.find(2).today-1) + get( + :index, + :params => { + :from => (User.find(2).today - 1) } + ) assert_response :success assert_select '.pagination a', :text => /Previous/ assert_select '.pagination a', :text => /Next/ -- 2.39.5