Defect #14990 » 0002-Add-an-API-test-for-sorting-time-entries-by-updated_.patch
| 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
|
||
- « Previous
- 1
- 2
- Next »