mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
FIX: Spec failures for feeds related to enabling categories as default
page for anons when latest is deleted.
This commit is contained in:
parent
41c0ff8d93
commit
eb512f07a7
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user