diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-03-16 20:16:51 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-03-16 20:16:51 +0000 |
commit | e7400dfbba3eb0ea2b0483852939bf7c7f9920d6 (patch) | |
tree | 6452d6c4a811693e3c2565816c164fa594808a93 /test/functional/my_controller_test.rb | |
parent | 23131d14f5ed86cac904a695df34dbcd011ecdd0 (diff) | |
download | redmine-e7400dfbba3eb0ea2b0483852939bf7c7f9920d6.tar.gz redmine-e7400dfbba3eb0ea2b0483852939bf7c7f9920d6.zip |
Fix tests (#1565).
git-svn-id: http://svn.redmine.org/redmine/trunk@16415 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/my_controller_test.rb')
-rw-r--r-- | test/functional/my_controller_test.rb | 8 |
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 |