Project

General

Profile

Defect #14990 » 0002-Add-an-API-test-for-sorting-time-entries-by-updated_.patch

Go MAEDA, 2026-09-20 08:12

View differences:

test/integration/api_test/time_entries_test.rb
assert_select 'time_entries[type=array] time_entry', 2
end
test "GET /time_entries.xml with sort by updated_on should return sorted results" do
TimeEntry.where(:id => 2).update_all(:updated_on => '2012-06-16 20:00:00')
get '/time_entries.xml?sort=updated_on:desc', :headers => credentials('jsmith')
assert_response :success
assert_equal '2', css_select('time_entries > time_entry > id').first.text
end
test "GET /time_entries/:id.xml should return the time entry" do
get '/time_entries/4.xml', :headers => credentials('jsmith')
assert_response :success
(2-2/2)