FIX: Spec failures for feeds related to enabling categories as default

page for anons when latest is deleted.
This commit is contained in:
Robin Ward 2014-09-11 15:30:10 -04:00
parent 41c0ff8d93
commit eb512f07a7
3 changed files with 7 additions and 3 deletions

View File

@ -84,7 +84,7 @@ class ListController < ApplicationController
end
end
Discourse.anonymous_filters.each do |filter|
Discourse.feed_filters.each do |filter|
define_method("#{filter}_feed") do
discourse_expires_in 1.minute

View File

@ -59,6 +59,10 @@ module Discourse
@filters ||= [:latest, :unread, :new, :starred, :read, :posted]
end
def self.feed_filters
@feed_filters ||= [:latest]
end
def self.anonymous_filters
@anonymous_filters ||= [:latest, :top, :categories]
end

View File

@ -13,7 +13,7 @@ describe ListController do
describe 'indexes' do
Discourse.anonymous_filters.each do |filter|
(Discourse.anonymous_filters - [:categories]).each do |filter|
context "#{filter}" do
before { xhr :get, filter }
it { should respond_with(:success) }
@ -39,7 +39,7 @@ describe ListController do
describe 'RSS feeds' do
Discourse.anonymous_filters.each do |filter|
Discourse.feed_filters.each do |filter|
it 'renders RSS' do
get "#{filter}_feed", format: :rss