Patch #16069 » 0002-add-test.patch
| test/integration/api_test/api_test.rb | ||
|---|---|---|
|
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
|
||