From 8b57ffc3c750b253e316fbfd8871d5c2da045557 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Fri, 3 May 2024 13:14:18 +0000 Subject: Adds the date of the last activity to the list of available columns for Projects (#23954). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Frederico Camara (@fredsdc) and Marius BĂLTEANU (@marius.balteanu). git-svn-id: https://svn.redmine.org/redmine/trunk@22811 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/projects_controller_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/functional') diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb index a2356185b..d1de3b631 100644 --- a/test/functional/projects_controller_test.rb +++ b/test/functional/projects_controller_test.rb @@ -252,6 +252,18 @@ class ProjectsControllerTest < Redmine::ControllerTest assert_select ".total-for-cf-#{field.id} span.value", :text => '9' end + def test_index_with_last_activity_date_column + with_settings :project_list_defaults => {'column_names' => %w(name short_description last_activity_date)} do + get :index, :params => { + :display_type => 'list' + } + assert_response :success + end + assert_equal ['Name', 'Description', 'Last activity'], columns_in_list + assert_select 'tr#project-1 td.last_activity_date', :text => format_time(Journal.find(3).created_on) + assert_select 'tr#project-4 td.last_activity_date', :text => '' + end + def test_index_should_retrieve_default_query query = ProjectQuery.find(11) ProjectQuery.stubs(:default).returns query -- cgit v1.2.3