diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-11-18 08:37:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-11-18 08:37:24 +0000 |
commit | 4df50bc66b40593b60dd7543ec3339ef6f549d8d (patch) | |
tree | 7d04290207985872688a48a35a133859ac3bdefd /test/integration | |
parent | e9184adafc2cf68d4fb97c664b1ff39830eff306 (diff) | |
download | redmine-4df50bc66b40593b60dd7543ec3339ef6f549d8d.tar.gz redmine-4df50bc66b40593b60dd7543ec3339ef6f549d8d.zip |
Adds a test for #24297.
git-svn-id: http://svn.redmine.org/redmine/trunk@15956 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/api_test/time_entries_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/integration/api_test/time_entries_test.rb b/test/integration/api_test/time_entries_test.rb index f9d31eb8b..546f19a19 100644 --- a/test/integration/api_test/time_entries_test.rb +++ b/test/integration/api_test/time_entries_test.rb @@ -48,6 +48,17 @@ class Redmine::ApiTest::TimeEntriesTest < Redmine::ApiTest::Base assert_select 'time_entry id', :text => '2' end + test "GET /time_entries/:id.xml on closed project should return the time entry" do + project = TimeEntry.find(2).project + project.close + project.save! + + get '/time_entries/2.xml', {}, credentials('jsmith') + assert_response :success + assert_equal 'application/xml', @response.content_type + assert_select 'time_entry id', :text => '2' + end + test "POST /time_entries.xml with issue_id should create time entry" do assert_difference 'TimeEntry.count' do post '/time_entries.xml', {:time_entry => {:issue_id => '1', :spent_on => '2010-12-02', :hours => '3.5', :activity_id => '11'}}, credentials('jsmith') |