summaryrefslogtreecommitdiffstats
path: root/test/functional/my_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/my_controller_test.rb')
-rw-r--r--test/functional/my_controller_test.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb
index 5e3e9e940..92f5f8fa2 100644
--- a/test/functional/my_controller_test.rb
+++ b/test/functional/my_controller_test.rb
@@ -41,14 +41,18 @@ class MyControllerTest < Redmine::ControllerTest
preferences = User.find(2).pref
preferences[:my_page_layout] = {'top' => ['timelog']}
preferences.save!
- TimeEntry.create!(:user => User.find(2), :spent_on => Date.yesterday, :issue_id => 1, :hours => 2.5, :activity_id => 10)
+ with_issue = TimeEntry.create!(:user => User.find(2), :spent_on => Date.yesterday, :hours => 2.5, :activity_id => 10, :issue_id => 1)
+ without_issue = TimeEntry.create!(:user => User.find(2), :spent_on => Date.yesterday, :hours => 3.5, :activity_id => 10, :project_id => 1)
get :page
assert_response :success
- assert_select 'tr.time-entry' do
+ assert_select "tr#time-entry-#{with_issue.id}" do
assert_select 'td.subject a[href="/issues/1"]'
assert_select 'td.hours', :text => '2.50'
end
+ assert_select "tr#time-entry-#{without_issue.id}" do
+ assert_select 'td.hours', :text => '3.50'
+ end
end
def test_page_with_assigned_issues_block_and_no_custom_settings