end
end
- events = @activity.events(@date_from, @date_to)
+ events =
+ if params[:format] == 'atom'
+ @activity.events(nil, nil, :limit => Setting.feeds_limit.to_i)
+ else
+ @activity.events(@date_from, @date_to)
+ end
if events.empty? || stale?(:etag => [@activity.scope, @date_to, @date_from, @with_subprojects, @author, events.first, events.size, User.current, current_language])
respond_to do |format|
end
end
+ def test_index_atom_feed_should_respect_feeds_limit_setting
+ with_settings :feeds_limit => '20' do
+ get(
+ :index,
+ :params => {
+ :format => 'atom'
+ }
+ )
+ end
+ assert_response :success
+
+ assert_select 'feed' do
+ assert_select 'entry', :count => 20
+ end
+ end
+
def test_index_atom_feed_with_explicit_selection
get(
:index,