diff --git a/test/integration/api_test/api_test.rb b/test/integration/api_test/api_test.rb index af6b7b492..f3539d4a0 100644 --- a/test/integration/api_test/api_test.rb +++ b/test/integration/api_test/api_test.rb @@ -55,4 +55,12 @@ def test_head_response_should_have_empty_body assert_response :no_content assert_equal '', response.body end + + def test_setting_api_limit_should_limit_response_item_count + with_settings :api_limit => 5 do + get '/users.xml?limit=5', :headers => credentials('admin') + assert_select 'users[type=array][total_count][limit="5"][offset="0"]' + assert_select 'users user', 5 + end + end end