summaryrefslogtreecommitdiffstats
path: root/test/functional/timelog_report_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-06-18 06:13:18 +0000
committerGo MAEDA <maeda@farend.jp>2018-06-18 06:13:18 +0000
commitd32f0073193903bd708fc66c45ba29000eb44e8d (patch)
treec923b4ebc77d5698c64b2348d1a4a25e5d8ada96 /test/functional/timelog_report_test.rb
parent438d2f65fded1c7f57a370f6f3d6ccc752cadaec (diff)
downloadredmine-d32f0073193903bd708fc66c45ba29000eb44e8d.tar.gz
redmine-d32f0073193903bd708fc66c45ba29000eb44e8d.zip
Add links to Users, Projects and Versions in timelog report (#29042).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17404 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/timelog_report_test.rb')
-rw-r--r--test/functional/timelog_report_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/timelog_report_test.rb b/test/functional/timelog_report_test.rb
index 332b13a34..35ec559fc 100644
--- a/test/functional/timelog_report_test.rb
+++ b/test/functional/timelog_report_test.rb
@@ -71,6 +71,7 @@ class TimelogReportTest < Redmine::ControllerTest
get :report, :params => {:columns => 'week', :from => "2007-04-01", :to => "2007-04-30", :criteria => ['project']}
assert_response :success
assert_select 'tr.total td:last', :text => '8.65'
+ assert_select 'tr td.name a[href=?]', '/projects/ecookbook', :text => 'eCookbook'
end
def test_report_all_time
@@ -98,6 +99,20 @@ class TimelogReportTest < Redmine::ControllerTest
assert_select 'tr.total td:last', :text => '162.90'
end
+ def test_report_should_show_locked_users
+ @request.session[:user_id] = 1
+
+ user = User.find(2)
+ user.status = User::STATUS_LOCKED
+ user.save
+
+ get :report, :params => {:project_id => 1, :columns => 'month', :criteria => ["user", "activity"]}
+ assert_response :success
+
+ assert_select 'td.name a.user.active[href=?]', '/users/1', 1, :text => 'Redmine Admin'
+ assert_select 'td.name a.user.locked[href=?]', '/users/2', 1, :text => 'John Smith'
+ end
+
def test_report_custom_field_criteria_with_multiple_values_on_single_value_custom_field_should_not_fail
field = TimeEntryCustomField.create!(:name => 'multi', :field_format => 'list', :possible_values => ['value1', 'value2'])
entry = TimeEntry.create!(:project => Project.find(1), :hours => 1, :activity_id => 10, :user => User.find(2), :spent_on => Date.today)