summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-05-22 10:48:59 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-05-22 10:48:59 +0000
commit12801ca031c0f8d209ddf2af0be36e09ed8cd727 (patch)
treee61f2766e33ba4a62fc0307a9c105ccb5e567f1e /test
parentef00501c36992221a1afa5f5bd4706ed91fbb7f1 (diff)
downloadredmine-12801ca031c0f8d209ddf2af0be36e09ed8cd727.tar.gz
redmine-12801ca031c0f8d209ddf2af0be36e09ed8cd727.zip
Fixed: GET /time_entries.xml ignores limit/offset parameters (#8356).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5881 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/integration/api_test/time_entries_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/integration/api_test/time_entries_test.rb b/test/integration/api_test/time_entries_test.rb
index 60a9dba62..ce28c5dda 100644
--- a/test/integration/api_test/time_entries_test.rb
+++ b/test/integration/api_test/time_entries_test.rb
@@ -32,6 +32,16 @@ class ApiTest::TimeEntriesTest < ActionController::IntegrationTest
assert_tag :tag => 'time_entries',
:child => {:tag => 'time_entry', :child => {:tag => 'id', :content => '2'}}
end
+
+ context "with limit" do
+ should "return limited results" do
+ get '/time_entries.xml?limit=2', {}, :authorization => credentials('jsmith')
+ assert_response :success
+ assert_equal 'application/xml', @response.content_type
+ assert_tag :tag => 'time_entries',
+ :children => {:count => 2}
+ end
+ end
end
context "GET /time_entries/2.xml" do